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
Raise NotImplementedError if using wrong class #135
Raise NotImplementedError if using wrong class #135
Commits on Feb 14, 2022
-
Raise PlatformMismatchError if using wrong class
Instead of leaving abstract methods without definition when running on the other platform (Unix vs Windows), define them and raise a PlatformMismatchError if called on the wrong platform. This fixes pylint warnings such as Abstract class 'WindowsFileLock' with abstract methods instantiated Abstract class 'UnixFileLock' with abstract methods instantiated Fixes tox-dev#102
Configuration menu - View commit details
-
Copy full SHA for e5fdb3d - Browse repository at this point
Copy the full SHA e5fdb3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a2fa785 - Browse repository at this point
Copy the full SHA a2fa785View commit details
Commits on Feb 17, 2022
-
Use NotImplementedError, not PlatformMismatchError
Instead of defining a custom exception, PlatformMismatchError, use the standard NotImplementedError.
Configuration menu - View commit details
-
Copy full SHA for 62f649f - Browse repository at this point
Copy the full SHA 62f649fView commit details -
Add tests and a note in the change log
Add tests of UnixFileLock on Windows systems and WindowsFileLock on non-Windows systems, to make sure they are not abstract (but still raise NotImplementedError). This avoids pylint errors in code using filelock. Also added a note to the change log.
Configuration menu - View commit details
-
Copy full SHA for 1d61cdb - Browse repository at this point
Copy the full SHA 1d61cdbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 039dc57 - Browse repository at this point
Copy the full SHA 039dc57View commit details -
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Configuration menu - View commit details
-
Copy full SHA for 8954719 - Browse repository at this point
Copy the full SHA 8954719View commit details -
Tell flake8 that isabstract is not a misspelling
The Python standard library module "inspect" has a function called "isabstract". That is not a spelling mistake. Silence flake8 SC200 warning about "isabstract".
Configuration menu - View commit details
-
Copy full SHA for 6d1f52f - Browse repository at this point
Copy the full SHA 6d1f52fView commit details -
Make the wrong-platform tests a single test
Make a single test, and select lock_type based on sys.platform.
Configuration menu - View commit details
-
Copy full SHA for dc782e2 - Browse repository at this point
Copy the full SHA dc782e2View commit details -
Next minor release, and today's release date in the change log.
Configuration menu - View commit details
-
Copy full SHA for a2458d9 - Browse repository at this point
Copy the full SHA a2458d9View commit details -
Move isabstract check before lock instantiation
To make it a bit clearer, move the preliminary check of abstractness before the instantiation of a lock, so that the creation of the lock and the pytest.raises(NotImplementedError) are adjacent.
Configuration menu - View commit details
-
Copy full SHA for 399576e - Browse repository at this point
Copy the full SHA 399576eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f0e020 - Browse repository at this point
Copy the full SHA 4f0e020View commit details