Skip to content
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

release 1.2.1 #17

Merged
merged 3 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flake8_use_fstring/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.2'
__version__ = '1.2.1'
3 changes: 2 additions & 1 deletion flake8_use_fstring/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
from .base import (
BaseGreedyLogicalLineChecker as _Base,
)
from . import __version__


class StrFormatDetector(_Base):
name = 'use-fstring-format'
version = '1.0'
version = __version__

def __getitem__(self, i: int) -> bool:
token = self.tokens[i]
Expand Down
3 changes: 2 additions & 1 deletion flake8_use_fstring/percent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
from .base import (
BaseGreedyLogicalLineChecker as _Base,
)
from . import __version__


class PercentFormatDetector(_Base):
name = 'use-fstring-percent'
version = '1.0'
version = __version__

def __getitem__(self, i: int) -> bool:
return self.tokens[i].exact_type == _token.PERCENT
Expand Down
4 changes: 3 additions & 1 deletion flake8_use_fstring/prefix.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
BaseLogicalLineChecker as _Base,
)

from . import __version__

FSTRING_REGEX = _re.compile(r'^([a-zA-Z]*?[fF][a-zA-Z]*?){1}["\']')
NON_FSTRING_REGEX = _re.compile(
r'^[a-zA-Z]*(?:\'\'\'|\'|"""|")(.*?{.+?}.*)(?:\'|\'\'\'|"|""")$',
Expand All @@ -17,7 +19,7 @@

class MissingPrefixDetector(_Base):
name = 'use-fstring-prefix'
version = '1.0'
version = __version__
ignore_format = False
off_by_default = True

Expand Down