diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a68ff6..1df1886 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -70,11 +70,11 @@ Ready to contribute? Here's how to set up `cached-property` for local developmen Now you can make your changes locally. -5. Clean up the formatting (must be running at least Python 3.6): +5. Clean up the formatting (must be running at least Python 3.8): ```bash - $ pip install -U black - $ black . + $ pip install -U ruff + $ ruff format . ``` 6. When you're done making changes, check that your changes pass the tests, including testing other Python versions with tox: diff --git a/README.md b/README.md index b47bc6a..cc2b5b2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Github Actions status](https://github.com/pydanny/cached-property/workflows/Python%20package/badge.svg)](https://github.com/pydanny/cached-property/actions) [![PyPI](https://img.shields.io/pypi/v/cached-property.svg)](https://pypi.python.org/pypi/cached-property) -[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) +[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-000000.svg)](https://github.com/astral-sh/ruff) A decorator for caching properties in classes. diff --git a/setup.py b/setup.py index 4d08b9b..dd58d17 100755 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def read(fname): try: import wheel import twine - except: # Yes, this is not how we usually do try/except + except: # Yes, this is not how we usually do try/except raise ImportError('Run "pip install wheel twine"') os.system("python setup.py sdist bdist_wheel") os.system("twine upload dist/*") diff --git a/tests/test_async_cached_property.py b/tests/test_async_cached_property.py index e03ac82..24e1f79 100644 --- a/tests/test_async_cached_property.py +++ b/tests/test_async_cached_property.py @@ -18,7 +18,7 @@ def __init__(self): self.cached_total = 0 self.lock = Lock() - async def add_control(self): # noqa + async def add_control(self): # noqa self.control_total += 1 return self.control_total