Skip to content

Commit a660347

Browse files
Add ruff config file.
1 parent aeb46d8 commit a660347

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

ruff.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Never enforce `E501` (line length violations).
2+
ignore = ["E501"]
3+
4+
[per-file-ignores]
5+
"setup.py" = ["F401"]
6+
"src/concurrent_log_handler/queue.py" = ["E722"]

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
# platforms=["nt", "posix"],
7979
install_requires=install_requires,
8080
extras_require={
81-
"dev": ["pytest", "tox", "black"],
81+
"dev": ["pytest", "tox", "black", "ruff"],
8282
},
8383
tests_require=["pytest"],
8484
keywords=package_keywords,

src/concurrent_log_handler/__init__.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@
6969
from portalocker import LOCK_EX, lock, unlock
7070
from concurrent_log_handler.__version__ import __author__, __version__
7171

72-
# E501 - lines too long
73-
# ruff: noqa: E501
74-
75-
7672
try:
7773
import pwd
7874
import grp
@@ -632,6 +628,6 @@ def _do_chown_and_chmod(self, filename):
632628

633629
# Publish this class to the "logging.handlers" module so that it can be use
634630
# from a logging config file via logging.config.fileConfig().
635-
import logging.handlers
631+
import logging.handlers # noqa: E402
636632

637633
logging.handlers.ConcurrentRotatingFileHandler = ConcurrentRotatingFileHandler

src/example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def my_logging_setup(log_name="example.log", use_async=False):
5656
# Import this to install logging.handlers.ConcurrentRotatingFileHandler
5757
# The noinspection thing is so PyCharm doesn't think we're using this for no reason
5858
# noinspection PyUnresolvedReferences
59-
import concurrent_log_handler
59+
import concurrent_log_handler # noqa F401
6060

6161
logging_config = {
6262
"version": 1,

0 commit comments

Comments
 (0)