MCPcopy Index your code
hub / github.com/PyGithub/PyGithub / generateLicenseSection

Function generateLicenseSection

scripts/fix_headers.py:41–65  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

39
40
41def generateLicenseSection(filename):
42 yield "############################ Copyrights and license ############################"
43 yield "# #"
44 for year, name in sorted(listContributors(filename)):
45 line = "# Copyright " + year + " " + name
46 line += (79 - len(line)) * " " + "#"
47 yield line
48 yield "# #"
49 yield "# This file is part of PyGithub. #"
50 yield "# http://pygithub.readthedocs.io/ #"
51 yield "# #"
52 yield "# PyGithub is free software: you can redistribute it and/or modify it under #"
53 yield "# the terms of the GNU Lesser General Public License as published by the Free #"
54 yield "# Software Foundation, either version 3 of the License, or (at your option) #"
55 yield "# any later version. #"
56 yield "# #"
57 yield "# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #"
58 yield "# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #"
59 yield "# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #"
60 yield "# details. #"
61 yield "# #"
62 yield "# You should have received a copy of the GNU Lesser General Public License #"
63 yield "# along with PyGithub. If not, see <http://www.gnu.org/licenses/>. #"
64 yield "# #"
65 yield "################################################################################"
66
67
68def listContributors(filename):

Callers 2

fixMethod · 0.85
fixMethod · 0.85

Calls 1

listContributorsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…