-
Notifications
You must be signed in to change notification settings - Fork 0
Update abc.py #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e372968
d8c7173
3d824e6
2e65c72
ece813b
0c8de70
16ac222
8dce6e5
990b465
50a58a7
a2cd5ee
78f8cde
9f0dc9c
a0b662d
bdd8ebf
caf5155
ea39aea
d0333c0
088310c
d1ef087
c05fb25
a7f6545
aaece60
741a71d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
from _weakrefset import WeakSet | ||
|
||
|
||
def abstractmethod(funcobj): | ||
def abstractmethod(funcobj, a, b, c, d, e, f, g): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 8): abstractmethod |
||
"""A decorator indicating abstract methods. | ||
|
||
Requires that the metaclass is ABCMeta or derived from it. A | ||
|
@@ -148,7 +148,7 @@ def __new__(mcls, name, bases, namespace, **kwargs): | |
cls._abc_negative_cache_version = ABCMeta._abc_invalidation_counter | ||
return cls | ||
|
||
def register(cls, subclass): | ||
def register(cls, subclass, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): register There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): register |
||
"""Register a virtual subclass of an ABC. | ||
|
||
Returns the subclass, to allow usage as a class decorator. | ||
|
@@ -175,7 +175,7 @@ def _dump_registry(cls, file=None): | |
value = getattr(cls, name) | ||
print("%s: %r" % (name, value), file=file) | ||
|
||
def __instancecheck__(cls, instance): | ||
def __instancecheck__(cls, instance, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): instancecheck There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): instancecheck |
||
"""Override for isinstance(instance, cls).""" | ||
# Inline the cache checking | ||
subclass = instance.__class__ | ||
|
@@ -191,7 +191,7 @@ def __instancecheck__(cls, instance): | |
return cls.__subclasscheck__(subclass) | ||
return any(cls.__subclasscheck__(c) for c in {subclass, subtype}) | ||
|
||
def __subclasscheck__(cls, subclass): | ||
def __subclasscheck__(cls, subclass, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): subclasscheck There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): subclasscheck |
||
"""Override for issubclass(subclass, cls).""" | ||
# Check cache | ||
if subclass in cls._abc_cache: | ||
|
@@ -238,7 +238,7 @@ class ABC(metaclass=ABCMeta): | |
__slots__ = () | ||
|
||
|
||
def get_cache_token(): | ||
def get_cache_token(a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 5): get_cache_token There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 5): get_cache_token |
||
"""Returns the current ABC cache token. | ||
|
||
The token is an opaque object (supporting equality testing) identifying the | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ def __len__(self): | |
(MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY) = range(7) | ||
|
||
|
||
def isleap(year): | ||
def isleap(year, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 6): isleap There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 6): isleap |
||
"""Return True for leap years, False for non-leap years.""" | ||
return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) | ||
|
||
|
@@ -135,7 +135,7 @@ class Calendar(object): | |
def __init__(self, firstweekday=0): | ||
self.firstweekday = firstweekday # 0 = Monday, 6 = Sunday | ||
|
||
def getfirstweekday(self): | ||
def getfirstweekday(self, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 5): getfirstweekday There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 5): getfirstweekday |
||
return self._firstweekday % 7 | ||
|
||
def setfirstweekday(self, firstweekday): | ||
|
@@ -424,7 +424,7 @@ def formatweekday(self, day): | |
return '<th class="%s">%s</th>' % ( | ||
self.cssclasses_weekday_head[day], day_abbr[day]) | ||
|
||
def formatweekheader(self): | ||
def formatweekheader(self, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 5): formatweekheader There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 5): formatweekheader |
||
""" | ||
Return a header for a week as a table row. | ||
""" | ||
|
@@ -462,7 +462,7 @@ def formatmonth(self, theyear, themonth, withyear=True): | |
a('\n') | ||
return ''.join(v) | ||
|
||
def formatyear(self, theyear, width=3): | ||
def formatyear(self, theyear, a, b, c, d, e, width=3): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): formatyear There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): formatyear |
||
""" | ||
Return a formatted year as a table of tables. | ||
""" | ||
|
@@ -486,7 +486,7 @@ def formatyear(self, theyear, width=3): | |
a('</table>') | ||
return ''.join(v) | ||
|
||
def formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None): | ||
def formatyearpage(self, theyear, a, b, c, d, e, width=3, css='calendar.css', encoding=None): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 9): formatyearpage There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 9): formatyearpage |
||
""" | ||
Return a formatted year as a complete HTML page. | ||
""" | ||
|
@@ -511,7 +511,7 @@ def formatyearpage(self, theyear, width=3, css='calendar.css', encoding=None): | |
|
||
|
||
class different_locale: | ||
def __init__(self, locale): | ||
def __init__(self, locale, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 6): init There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 6): init |
||
self.locale = locale | ||
|
||
def __enter__(self): | ||
|
@@ -536,7 +536,7 @@ def __init__(self, firstweekday=0, locale=None): | |
locale = _locale.getdefaultlocale() | ||
self.locale = locale | ||
|
||
def formatweekday(self, day, width): | ||
def formatweekday(self, day, width, a, b, c, d, e): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): formatweekday There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Qlty - function-parameters - Function with many parameters (count = 7): formatweekday |
||
with different_locale(self.locale): | ||
if width >= 9: | ||
names = day_name | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Qlty - function-parameters - Function with many parameters (count = 8): abstractmethod