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

Enable flake8-datetime plugin for ruff #2335

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

cutwater
Copy link
Contributor

But add noqa for existing code, since fixing naive to aware datetime may cause bugs.

@cutwater cutwater requested a review from jctanner October 24, 2024 15:23
@github-actions github-actions bot added backport-4.9 This PR should be backported to stable-4.9 (2.4) backport-4.10 labels Oct 24, 2024
@cutwater cutwater removed backport-4.10 backport-4.9 This PR should be backported to stable-4.9 (2.4) labels Oct 24, 2024
@@ -192,15 +192,16 @@ def main():

# make a unique checkout for this new patch
branch_checkout = os.path.join(workdir, f'galaxy_ng.{cfg.branch}')
ts = datetime.datetime.now().isoformat().split('.')[0].replace('-', '_').replace(':', '_')
ts = datetime.datetime.now().strftime("%Y_%m_%dT%H_%M_%S") # noqa: DTZ005
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also this option

f"{datetime.now():%Y_%m_%dT%H_%M_%S}"
'2024_10_25T13_48_28'

But add `noqa` for existing code, since fixing naive to aware
datetime may cause bugs.
@cutwater cutwater force-pushed the feature/ruff/flake8-datetime branch from 7d643d4 to 514fe33 Compare October 25, 2024 13:21
Copy link

@cutwater cutwater merged commit a2d559a into ansible:master Oct 25, 2024
16 of 21 checks passed
@cutwater cutwater deleted the feature/ruff/flake8-datetime branch October 25, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants