Add APM #184

Merged
luketainton merged 5 commits from feature/apm into next 2024-04-21 17:17:03 +02:00
2 changed files with 2 additions and 3 deletions
Showing only changes of commit e9321704d5 - Show all commits

View File

@ -1,6 +1,6 @@
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
#!/usr/bin/env python3 #!/usr/bin/env python3
import pytz from zoneinfo import ZoneInfo
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
from datetime import datetime from datetime import datetime
@ -14,5 +14,5 @@ def timestamp_to_date(timestamp: int) -> str:
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
Returns: Returns:
str: Date in the format YYYY-MM-DD. str: Date in the format YYYY-MM-DD.
""" """
return datetime.fromtimestamp(timestamp=timestamp, tz=pytz.utc).strftime("%Y-%m-%d") return datetime.fromtimestamp(timestamp=timestamp, tz=ZoneInfo("UTC")).strftime("%Y-%m-%d")
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)

github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)
github-advanced-security[bot] commented 2024-04-21 17:06:24 +02:00 (Migrated from github.com)
Review

"zoneinfo" should be preferred to "pytz" when using Python 3.9 and later

Don't use `pytz` module with Python 3.9 and later.

See more on SonarCloud

Show more details

## "zoneinfo" should be preferred to "pytz" when using Python 3.9 and later <!--SONAR_ISSUE_KEY:AY8BMVpXcfZYxM2gvceW-->Don't use `pytz` module with Python 3.9 and later. <p>See more on <a href="https://sonarcloud.io/project/issues?id=luketainton_roboluke-tasks&issues=AY8BMVpXcfZYxM2gvceW&open=AY8BMVpXcfZYxM2gvceW&pullRequest=184">SonarCloud</a></p> [Show more details](https://github.com/luketainton/roboluke-tasks/security/code-scanning/4)

View File

@ -30,7 +30,6 @@ PyJWT==2.8.0
pyparsing==3.1.2 pyparsing==3.1.2
python-dateutil==2.9.0.post0 python-dateutil==2.9.0.post0
python-dotenv==1.0.1 python-dotenv==1.0.1
pytz==2024.1
PyYAML==6.0.1 PyYAML==6.0.1
requests==2.31.0 requests==2.31.0
requests-toolbelt==1.0.0 requests-toolbelt==1.0.0