Either all return statements in a function should return an expression, or none of them should. Open
def inner(fut: PythonFuture):
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
According to PEP8, if any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None, and an explicit return statement should be present at the end of the function (if reachable)
Unnecessary else
after return
Open
if not isinstance(fut, Future):
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.
Unnecessary else
after return
Open
if self.source_future._state == FINISHED:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.
Unnecessary else
after return
Open
if self._state == PRE_FINISHED:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.
Unnecessary else
after return
Open
if self._state == PRE_FINISHED:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.
Either all return statements in a function should return an expression, or none of them should. Open
def inner(fut: PythonFuture):
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
According to PEP8, if any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None, and an explicit return statement should be present at the end of the function (if reachable)
Access to a protected member _state of a client class Open
return self.source_future._state
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _exception of a client class Open
return fun(fut._exception)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _state of a client class Open
if self.source_future._state == FINISHED:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _base of a client class Open
concurrent.futures._base._STATE_TO_DESCRIPTION_MAP[PRE_FINISHED] = 'pre-finished'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _result of a client class Open
return fun(fut._result)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _base of a client class Open
class InvalidStateError(concurrent.futures._base.Error):
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Catching too general exception Exception Open
except Exception:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when an except catches a too general exception, possibly burying unrelated errors.
Access to a protected member _exception of a client class Open
if future._exception is not None:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _exception of a client class Open
if future._exception is not None:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _exception of a client class Open
result = future._exception
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _result of a client class Open
self.set_result(future._result)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _exception of a client class Open
if fut._exception is not None:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Catching too general exception Exception Open
except Exception:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when an except catches a too general exception, possibly burying unrelated errors.
Access to a protected member _FUTURE_STATES of a client class Open
concurrent.futures._base._FUTURE_STATES.append(PRE_FINISHED)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Signature differs from overridden 'exception' method Open
def exception(self, timeout: None) -> tp.Type[Exception]:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a method signature is different than in the implemented interface or in an overridden method.
Access to a protected member _exception of a client class Open
self.set_exception(future._exception)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _STATE_TO_DESCRIPTION_MAP of a client class Open
concurrent.futures._base._STATE_TO_DESCRIPTION_MAP[PRE_FINISHED] = 'pre-finished'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _exception of a client class Open
if fut._exception is None:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _result of a client class Open
result = future._result
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Access to a protected member _base of a client class Open
concurrent.futures._base._FUTURE_STATES.append(PRE_FINISHED)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when a protected member (i.e. class member with a name beginning with an underscore) is access outside the class or a descendant of the class where it's defined.
Line too long (81 > 79 characters) Open
raise InvalidStateError('{}: {!r}'.format(self._state, self))
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (80 > 79 characters) Open
if self._state in {CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED}:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (80 > 79 characters) Open
if self._state in {CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED}:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (83 > 79 characters) Open
"""Raised when the future is in invalid state to execute given operation"""
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (81 > 79 characters) Open
raise InvalidStateError('{}: {!r}'.format(self._state, self))
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (81 > 79 characters) Open
concurrent.futures._base._STATE_TO_DESCRIPTION_MAP[PRE_FINISHED] = 'pre-finished'
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (80 > 79 characters) Open
if self._state not in [CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED]:
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (94 > 79 characters) Open
Schedule function to be called with the result of this future as it's argument only if
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (80 > 79 characters) Open
from concurrent.futures._base import CANCELLED, CANCELLED_AND_NOTIFIED, FINISHED
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (87 > 79 characters) Open
A future that allows it's callback handlers to change it's result before presenting
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (87 > 79 characters) Open
Schedule function to be called with the exception value that befall this future
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Line too long (90 > 79 characters) Open
Schedule function to be called with the result of this future as it's argument (or
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Limit all lines to a maximum of 79 characters.
There are still many devices around that are limited to 80 character
lines; plus, limiting windows to 80 characters makes it possible to
have several windows side-by-side. The default wrapping on such
devices looks ugly. Therefore, please limit all lines to a maximum
of 79 characters. For flowing long blocks of text (docstrings or
comments), limiting the length to 72 characters is recommended.
Reports error E501.
Argument name v
doesn't conform to snake_case naming style Open
def _state(self, v: str):
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Argument name fn
doesn't conform to snake_case naming style Open
def add_pre_done_callback(self, fn):
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).