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

Infrastructure updates #34

Merged
merged 1 commit into from
Oct 8, 2023
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,5 @@ allure-report
ignore-config.yaml
gh-pages
*.pub
session_data/
session_data_original/
34 changes: 17 additions & 17 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py39-plus]
- repo: https://github.com/PyCQA/autoflake
rev: v2.0.0
rev: v2.2.1
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.9.1
hooks:
- id: black
args:
- --quiet
files: ^((src|tests)/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
rev: v2.2.6
hooks:
- id: codespell
args:
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude: ^tests/data/
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
- pycodestyle==2.10.0
- pyflakes==3.0.1
- flake8-docstrings==1.6.0
- pydocstyle==6.1.1
- flake8-comprehensions==3.10.1
- flake8-noqa==1.3.0
- mccabe==0.7.0
- pycodestyle
- pyflakes
- flake8-docstrings
- pydocstyle
- flake8-comprehensions
- flake8-noqa
- mccabe
files: ^(src|tests)/.+\.py$
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
rev: 1.7.5
hooks:
- id: bandit
args:
Expand All @@ -49,13 +49,13 @@ repos:
- --configfile=tests/bandit.yaml
files: ^(src|tests)/.+\.py$
- repo: https://github.com/PyCQA/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort
args:
- --profile=black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-executables-have-shebangs
stages: [manual]
Expand All @@ -65,11 +65,11 @@ repos:
args:
- --branch=main
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.29.0
rev: v1.32.0
hooks:
- id: yamllint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v3.0.3
hooks:
- id: prettier
# - repo: https://github.com/cdce8p/python-typing-update
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,17 @@ It is strongly suggested to open file handles as binary rather than text to prev
further down the line.

### Accessing App Data

The `get_app_node` method can be used to retrieve a node with app data (that is not shown in `api.drive.dir()`). This is where the individual apps store related documents.

```bash
>>> node = api.drive.get_app_node("XXXXXXXXXX.com.apple.iMovie")
```

Ids of individual app data can be found in `~/Library/Mobile Documents` (can only be accessed in Terminal). `~` must be replaced with `.`.

Node can then be used just like any other node, supporting `mkdir`, `rename`, `delete` and so on:

```
>>> node.mkdir('2020')
>>> node.rename('2020_copy')
Expand Down
2 changes: 1 addition & 1 deletion icloudpy/services/photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def albums(self):
folder_name = base64.b64decode(
folder["fields"]["albumNameEnc"]["value"]
).decode("utf-8")

query_filter = [
{
"fieldName": "parentId",
Expand Down
3 changes: 1 addition & 2 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -440,5 +440,4 @@ valid-metaclass-classmethod-first-arg=mcs

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=StandardError,
BaseException
overgeneral-exceptions=builtins.StandardError, builtins.BaseException
1 change: 0 additions & 1 deletion tests/bandit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ tests:
- B318
- B319
- B320
- B325
- B601
- B602
- B604
Expand Down