Compare commits

..

23 Commits

Author SHA1 Message Date
9907cc50f1 Merge pull request 'v3.3.1' (#160) from dev into main
All checks were successful
Analysis / SonarCloud (push) Successful in 46s
Tests / Build and Test (3.10) (push) Successful in 1m3s
Tests / Build and Test (3.11) (push) Successful in 1m1s
Tests / Build and Test (3.12) (push) Successful in 1m8s
Tests / Build and Test (3.9) (push) Successful in 1m3s
Reviewed-on: #160
2024-12-16 23:57:08 +02:00
40827e70a1 Bump version to fix metadata
All checks were successful
Analysis / SonarCloud (push) Successful in 42s
Analysis / SonarCloud (pull_request) Successful in 38s
Tests / Build and Test (3.10) (pull_request) Successful in 1m4s
Tests / Build and Test (3.11) (pull_request) Successful in 1m2s
Tests / Build and Test (3.12) (pull_request) Successful in 1m13s
Tests / Build and Test (3.9) (pull_request) Successful in 1m8s
2024-12-16 22:54:41 +01:00
1b60257bc5 Merge pull request 'v3.3.0' (#159) from dev into main
All checks were successful
Analysis / SonarCloud (push) Successful in 43s
Tests / Build and Test (3.10) (push) Successful in 1m2s
Tests / Build and Test (3.11) (push) Successful in 1m2s
Tests / Build and Test (3.12) (push) Successful in 1m8s
Tests / Build and Test (3.9) (push) Successful in 1m4s
Reviewed-on: #159
2024-12-16 23:48:07 +02:00
7e03a0c779 Update dependency pytest-asyncio to v0.25.0
All checks were successful
Analysis / SonarCloud (push) Successful in 48s
Analysis / SonarCloud (pull_request) Successful in 46s
Tests / Build and Test (3.10) (pull_request) Successful in 1m6s
Tests / Build and Test (3.11) (pull_request) Successful in 1m2s
Tests / Build and Test (3.12) (pull_request) Successful in 1m10s
Tests / Build and Test (3.9) (pull_request) Successful in 1m6s
2024-12-13 08:58:25 +02:00
5f4d0b09f9 Update dependency pylint to v3.3.2
All checks were successful
Analysis / SonarCloud (pull_request) Successful in 35s
Tests / Build and Test (3.10) (pull_request) Successful in 1m4s
Tests / Build and Test (3.11) (pull_request) Successful in 1m6s
Tests / Build and Test (3.12) (pull_request) Successful in 1m13s
Tests / Build and Test (3.9) (pull_request) Successful in 1m5s
Analysis / SonarCloud (push) Successful in 40s
2024-12-01 21:32:47 +02:00
f6596d1db6 Update dependency pytest to v8.3.4
All checks were successful
Analysis / SonarCloud (pull_request) Successful in 38s
Tests / Build and Test (3.10) (pull_request) Successful in 1m2s
Tests / Build and Test (3.11) (pull_request) Successful in 1m1s
Tests / Build and Test (3.12) (pull_request) Successful in 1m11s
Tests / Build and Test (3.9) (pull_request) Successful in 1m5s
Analysis / SonarCloud (push) Successful in 41s
2024-12-01 15:17:19 +02:00
cbc4fc36a1 Update dependency apscheduler to ~=3.11.0
All checks were successful
Analysis / SonarCloud (pull_request) Successful in 57s
Tests / Build and Test (3.10) (pull_request) Successful in 1m11s
Tests / Build and Test (3.11) (pull_request) Successful in 1m11s
Tests / Build and Test (3.12) (pull_request) Successful in 1m16s
Tests / Build and Test (3.9) (pull_request) Successful in 1m10s
Analysis / SonarCloud (push) Successful in 47s
2024-11-24 21:56:08 +02:00
d20d07bb6a Fixed a few things mentioned in SonarCloud
All checks were successful
Analysis / SonarCloud (push) Successful in 40s
2024-10-29 23:19:52 +01:00
4ee704b41e Merge pull request 'Removed explicit action host' (#154) from profitroll/actions-fix into dev
All checks were successful
Analysis / SonarCloud (push) Successful in 40s
Reviewed-on: #154
2024-10-29 23:57:43 +02:00
02cfc42f60 Separated SonarCloud from normal tests
All checks were successful
Analysis / SonarCloud (pull_request) Successful in 40s
Tests / Build and Test (3.10) (pull_request) Successful in 1m4s
Tests / Build and Test (3.11) (pull_request) Successful in 1m2s
Tests / Build and Test (3.12) (pull_request) Successful in 1m8s
Tests / Build and Test (3.9) (pull_request) Successful in 1m8s
2024-10-29 22:55:01 +01:00
2757bd6b72 Removed explicit action host
All checks were successful
Tests / Build and Test (3.10) (pull_request) Successful in 1m4s
Tests / Build and Test (3.11) (pull_request) Successful in 1m1s
Tests / Build and Test (3.12) (pull_request) Successful in 1m7s
Tests / Build and Test (3.9) (pull_request) Successful in 1m4s
Tests / SonarCloud (pull_request) Successful in 37s
2024-10-29 23:42:07 +02:00
fe71860faa Merge pull request 'Test PR' (#152) from profitroll/python-3.12 into dev
Reviewed-on: #152
2024-10-29 23:40:19 +02:00
8fc5a18fab Merge pull request 'Update dependency pytest-cov to v6' (#153) from renovate/pytest-cov-6.x into dev
Reviewed-on: #153
2024-10-29 23:40:10 +02:00
c9e4b3b916 Update dependency pytest-cov to v6
Some checks failed
Tests / Build and Test (3.10) (pull_request) Successful in 1m6s
Tests / Build and Test (3.11) (pull_request) Successful in 1m4s
Tests / Build and Test (3.12) (pull_request) Successful in 1m15s
Tests / Build and Test (3.9) (pull_request) Successful in 1m4s
Tests / SonarCloud (pull_request) Failing after 0s
2024-10-29 22:25:05 +02:00
acb77049d1 Changed the sonarcloud action link
Some checks failed
Tests / Build and Test (3.10) (pull_request) Successful in 1m7s
Tests / Build and Test (3.11) (pull_request) Successful in 1m2s
Tests / Build and Test (3.12) (pull_request) Successful in 1m9s
Tests / Build and Test (3.9) (pull_request) Successful in 1m3s
Tests / SonarCloud (pull_request) Failing after 0s
2024-10-29 17:55:02 +02:00
171e36a491 Merge pull request 'v3.2.3' (#118) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 1m2s
Tests / test (3.11) (push) Successful in 58s
Tests / test (3.8) (push) Successful in 1m4s
Tests / test (3.9) (push) Successful in 1m1s
Reviewed-on: #118
2024-07-10 00:07:54 +03:00
c419c684aa Merge pull request 'v3.2.2' (#107) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 1m10s
Tests / test (3.11) (push) Successful in 1m4s
Tests / test (3.8) (push) Successful in 1m6s
Tests / test (3.9) (push) Successful in 1m7s
Reviewed-on: #107
2024-05-26 22:44:18 +03:00
748b2b2abb Merge pull request 'v3.2.1' (#106) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 1m3s
Tests / test (3.11) (push) Successful in 1m23s
Tests / test (3.8) (push) Successful in 1m7s
Tests / test (3.9) (push) Successful in 1m7s
Reviewed-on: #106
2024-05-26 17:53:00 +03:00
52c2e5cc13 Merge pull request 'v3.2.0' (#105) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 1m4s
Tests / test (3.11) (push) Successful in 1m2s
Tests / test (3.8) (push) Successful in 1m29s
Tests / test (3.9) (push) Successful in 1m4s
Reviewed-on: #105
2024-05-26 17:29:44 +03:00
55c61e3fce Merge pull request 'v3.1.0' (#102) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 55s
Tests / test (3.11) (push) Successful in 55s
Tests / test (3.8) (push) Successful in 57s
Tests / test (3.9) (push) Successful in 1m27s
Reviewed-on: #102
2024-05-19 16:22:17 +03:00
b9550032ba Merge pull request 'Update to 3.0.1' (#98) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 57s
Tests / test (3.11) (push) Successful in 54s
Tests / test (3.8) (push) Successful in 1m8s
Tests / test (3.9) (push) Successful in 55s
Reviewed-on: #98
2024-05-15 00:19:03 +03:00
5ba763246b Merge pull request 'Update to 3.0.0' (#52) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 1m15s
Tests / test (3.11) (push) Successful in 1m14s
Tests / test (3.8) (push) Successful in 1m14s
Tests / test (3.9) (push) Successful in 1m22s
Reviewed-on: #52
2024-01-04 00:06:50 +02:00
f0ffdf096d Merge pull request 'Pycord support initial release' (#48) from dev into main
All checks were successful
Tests / test (3.10) (push) Successful in 1m8s
Tests / test (3.11) (push) Successful in 1m5s
Tests / test (3.8) (push) Successful in 1m43s
Tests / test (3.9) (push) Successful in 1m3s
Reviewed-on: #48
2023-12-27 15:00:41 +02:00
10 changed files with 46 additions and 30 deletions

View File

@@ -0,0 +1,24 @@
name: Analysis
on:
push:
branches:
- main
- dev
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@@ -36,17 +36,4 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: Artifacts name: Artifacts
path: dist/* path: dist/*
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

View File

@@ -2,10 +2,10 @@ black==24.10.0
build==1.2.2.post1 build==1.2.2.post1
isort==5.13.2 isort==5.13.2
mypy==1.13.0 mypy==1.13.0
pylint==3.3.1 pylint==3.3.2
pytest-asyncio==0.24.0 pytest-asyncio==0.25.0
pytest-cov==5.0.0 pytest-cov==6.0.0
pytest==8.3.3 pytest==8.3.4
tox==4.23.2 tox==4.23.2
types-aiofiles==24.1.0.20240626 types-aiofiles==24.1.0.20240626
types-ujson==5.10.0.20240515 types-ujson==5.10.0.20240515

View File

@@ -1,2 +1,2 @@
apscheduler~=3.10.4 apscheduler~=3.11.0
py-cord~=2.6.0 py-cord~=2.6.0

View File

@@ -1,2 +1,2 @@
apscheduler~=3.10.4 apscheduler~=3.11.0
pyrofork~=2.3.32 pyrofork~=2.3.32

View File

@@ -1,4 +1,4 @@
__version__ = "3.3.0" __version__ = "3.3.1"
__license__ = "GPL3" __license__ = "GPL3"
__author__ = "Profitroll" __author__ = "Profitroll"

View File

@@ -11,6 +11,8 @@ except ImportError:
from ._utils import supports_argument from ._utils import supports_argument
from .sync._nested import nested_delete, nested_set from .sync._nested import nested_delete, nested_set
DEFAULT_CONFIG_LOCATION: str = "config.json"
async def json_read(path: Union[str, Path]) -> Any: async def json_read(path: Union[str, Path]) -> Any:
"""Read contents of a JSON file """Read contents of a JSON file
@@ -43,7 +45,7 @@ async def json_write(data: Any, path: Union[str, Path]) -> None:
async def config_get( async def config_get(
key: str, *path: str, config_file: Union[str, Path] = "config.json" key: str, *path: str, config_file: Union[str, Path] = DEFAULT_CONFIG_LOCATION
) -> Any: ) -> Any:
"""Get a value of the config key by its path provided """Get a value of the config key by its path provided
For example, `foo.bar.key` has a path of `"foo", "bar"` and the key `"key"` For example, `foo.bar.key` has a path of `"foo", "bar"` and the key `"key"`
@@ -83,7 +85,7 @@ async def config_get(
async def config_set( async def config_set(
key: str, value: Any, *path: str, config_file: Union[str, Path] = "config.json" key: str, value: Any, *path: str, config_file: Union[str, Path] = DEFAULT_CONFIG_LOCATION
) -> None: ) -> None:
"""Set config's key by its path to the value """Set config's key by its path to the value
@@ -99,14 +101,13 @@ async def config_set(
await json_write( await json_write(
nested_set(await json_read(config_file), value, *(*path, key)), config_file nested_set(await json_read(config_file), value, *(*path, key)), config_file
) )
return
async def config_delete( async def config_delete(
key: str, key: str,
*path: str, *path: str,
missing_ok: bool = False, missing_ok: bool = False,
config_file: Union[str, Path] = "config.json", config_file: Union[str, Path] = DEFAULT_CONFIG_LOCATION,
) -> None: ) -> None:
"""Set config's key by its path """Set config's key by its path

View File

@@ -358,7 +358,8 @@ class PyroClient(Client):
] ]
logger.info( logger.info(
"Registering commands %s with a default scope 'BotCommandScopeDefault'" "Registering commands %s with a default scope 'BotCommandScopeDefault'",
commands
) )
await self.set_bot_commands(commands) await self.set_bot_commands(commands)

View File

@@ -9,6 +9,8 @@ try:
except ImportError: except ImportError:
from json import dumps, loads from json import dumps, loads
DEFAULT_CONFIG_LOCATION: str = "config.json"
def json_read(path: Union[str, Path]) -> Any: def json_read(path: Union[str, Path]) -> Any:
"""Read contents of a JSON file """Read contents of a JSON file
@@ -41,7 +43,7 @@ def json_write(data: Any, path: Union[str, Path]) -> None:
def config_get( def config_get(
key: str, *path: str, config_file: Union[str, Path] = "config.json" key: str, *path: str, config_file: Union[str, Path] = DEFAULT_CONFIG_LOCATION
) -> Any: ) -> Any:
"""Get a value of the config key by its path provided """Get a value of the config key by its path provided
For example, `foo.bar.key` has a path of `"foo", "bar"` and the key `"key"` For example, `foo.bar.key` has a path of `"foo", "bar"` and the key `"key"`
@@ -81,7 +83,7 @@ def config_get(
def config_set( def config_set(
key: str, value: Any, *path: str, config_file: Union[str, Path] = "config.json" key: str, value: Any, *path: str, config_file: Union[str, Path] = DEFAULT_CONFIG_LOCATION
) -> None: ) -> None:
"""Set config's key by its path to the value """Set config's key by its path to the value
@@ -95,14 +97,13 @@ def config_set(
* `KeyError`: Key is not found under path provided * `KeyError`: Key is not found under path provided
""" """
json_write(nested_set(json_read(config_file), value, *(*path, key)), config_file) json_write(nested_set(json_read(config_file), value, *(*path, key)), config_file)
return
def config_delete( def config_delete(
key: str, key: str,
*path: str, *path: str,
missing_ok: bool = False, missing_ok: bool = False,
config_file: Union[str, Path] = "config.json", config_file: Union[str, Path] = DEFAULT_CONFIG_LOCATION,
) -> None: ) -> None:
"""Set config's key by its path """Set config's key by its path

View File

@@ -6,10 +6,12 @@ from libbot._utils import supports_argument
def func1(foo: str, bar: str): def func1(foo: str, bar: str):
"""Dummy function with specific arguments"""
pass pass
def func2(foo: str): def func2(foo: str):
"""Dummy function with specific arguments"""
pass pass