diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-09-18 09:00:22 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2022-09-19 16:14:13 +0200 |
commit | 8d6d31bb8f9b44c6147522c49fa099c110b067f0 (patch) | |
tree | 2c013903e5d156d1021502d66d66d0bbf91f5808 /astroid/brain | |
parent | 731d0515fcbc3c95813270021ec422d3114e13d6 (diff) | |
download | astroid-git-8d6d31bb8f9b44c6147522c49fa099c110b067f0.tar.gz |
[flake8] Set the max line length to 110 instead of 138
Co-authored-by: Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Diffstat (limited to 'astroid/brain')
-rw-r--r-- | astroid/brain/brain_numpy_core_multiarray.py | 13 | ||||
-rw-r--r-- | astroid/brain/brain_typing.py | 7 |
2 files changed, 13 insertions, 7 deletions
diff --git a/astroid/brain/brain_numpy_core_multiarray.py b/astroid/brain/brain_numpy_core_multiarray.py index 487ec471..dbdb24ea 100644 --- a/astroid/brain/brain_numpy_core_multiarray.py +++ b/astroid/brain/brain_numpy_core_multiarray.py @@ -47,10 +47,15 @@ METHODS_TO_BE_INFERRED = { return numpy.ndarray([0, 0])""", "bincount": """def bincount(x, weights=None, minlength=0): return numpy.ndarray([0, 0])""", - "busday_count": """def busday_count(begindates, enddates, weekmask='1111100', holidays=[], busdaycal=None, out=None): - return numpy.ndarray([0, 0])""", - "busday_offset": """def busday_offset(dates, offsets, roll='raise', weekmask='1111100', holidays=None, busdaycal=None, out=None): - return numpy.ndarray([0, 0])""", + "busday_count": """def busday_count( + begindates, enddates, weekmask='1111100', holidays=[], busdaycal=None, out=None + ): + return numpy.ndarray([0, 0])""", + "busday_offset": """def busday_offset( + dates, offsets, roll='raise', weekmask='1111100', holidays=None, + busdaycal=None, out=None + ): + return numpy.ndarray([0, 0])""", "can_cast": """def can_cast(from_, to, casting='safe'): return True""", "copyto": """def copyto(dst, src, casting='same_kind', where=True): diff --git a/astroid/brain/brain_typing.py b/astroid/brain/brain_typing.py index 807ba96e..b34b8bec 100644 --- a/astroid/brain/brain_typing.py +++ b/astroid/brain/brain_typing.py @@ -240,7 +240,7 @@ def _forbid_class_getitem_access(node: ClassDef) -> None: def full_raiser(origin_func, attr, *args, **kwargs): """ Raises an AttributeInferenceError in case of access to __class_getitem__ method. - Otherwise just call origin_func. + Otherwise, just call origin_func. """ if attr == "__class_getitem__": raise AttributeInferenceError("__class_getitem__ access is not allowed") @@ -248,8 +248,9 @@ def _forbid_class_getitem_access(node: ClassDef) -> None: try: node.getattr("__class_getitem__") - # If we are here, then we are sure to modify object that do have __class_getitem__ method (which origin is one the - # protocol defined in collections module) whereas the typing module consider it should not + # If we are here, then we are sure to modify an object that does have + # __class_getitem__ method (which origin is the protocol defined in + # collections module) whereas the typing module considers it should not. # We do not want __class_getitem__ to be found in the classdef partial_raiser = partial(full_raiser, node.getattr) node.getattr = partial_raiser |