Skip to content

Commit

Permalink
Merge pull request ynput#134 from ynput/enhancement/add-ruff-linting
Browse files Browse the repository at this point in the history
Chore: Git workflows
  • Loading branch information
iLLiCiTiT authored Aug 2, 2024
2 parents 22285eb + 171646d commit dd557f5
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 372 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/nightly_merge.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/pr_linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 📇 Code Linting

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number}}
cancel-in-progress: true

permissions:
contents: read
pull-requests: write

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
64 changes: 0 additions & 64 deletions .github/workflows/test_build.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/update_bug_report.yml

This file was deleted.

2 changes: 0 additions & 2 deletions common/ayon_common/connection/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
get_ayon_appdirs,
get_local_site_id,
get_ayon_launch_args,
is_staging_enabled,
is_dev_mode_enabled,
)


Expand Down
4 changes: 2 additions & 2 deletions common/ayon_common/distribution/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ def _install_windows(self, filepath):
self.log.error(log_output)
raise InstallerDistributionError(
"Install process failed without known reason."
f" Try to install AYON manually."
" Try to install AYON manually."
)

executable = install_exe_path.strip() or None
Expand Down Expand Up @@ -786,7 +786,7 @@ def _post_source_process(
exc_info=True
)
self._installer_error = (
f"Distribution of AYON launcher"
"Distribution of AYON launcher"
" failed with unexpected reason."
)

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
"""Setup info for building AYON Desktop application."""
import os
import re
import platform
from pathlib import Path

Expand Down
19 changes: 9 additions & 10 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,41 +327,40 @@ def _print(message: str):
elif os.getenv("SSL_CERT_FILE") != certifi.where():
_print("--- your system is set to use custom CA certificate bundle.")

from ayon_api import (
from ayon_api import ( # noqa E402
get_base_url,
set_default_settings_variant,
get_addons_studio_settings,
)
from ayon_api.constants import (
from ayon_api.constants import ( # noqa E402
SERVER_URL_ENV_KEY,
SERVER_API_ENV_KEY,
DEFAULT_VARIANT_ENV_KEY,
SITE_ID_ENV_KEY,
)
from ayon_common import is_staging_enabled, is_dev_mode_enabled
from ayon_common.connection.credentials import (
from ayon_common import is_staging_enabled, is_dev_mode_enabled # noqa E402
from ayon_common.connection.credentials import ( # noqa E402
ask_to_login_ui,
add_server,
need_server_or_login,
load_environments,
set_environments,
create_global_connection,
confirm_server_login,
show_invalid_credentials_ui,
)
from ayon_common.distribution import (
from ayon_common.distribution import ( # noqa E402
AyonDistribution,
BundleNotFoundError,
show_missing_bundle_information,
show_installer_issue_information,
UpdateWindowManager,
)

from ayon_common.utils import (
from ayon_common.utils import ( # noqa E402
store_current_executable_info,
get_local_site_id,
)
from ayon_common.startup import show_startup_error
from ayon_common.startup import show_startup_error # noqa E402


def set_global_environments() -> None:
Expand Down Expand Up @@ -827,7 +826,7 @@ def main_cli():
"""

try:
import ayon_core
import ayon_core # noqa F401
ayon_core_used = True
except ImportError:
ayon_core_used = False
Expand Down Expand Up @@ -913,7 +912,7 @@ def script_cli(start_arg=None):
start_arg = StartArgScript.from_args(sys.argv)

# Remove first argument from sys.argv
# - start.py when running from code
# - start.py when running from code
# - ayon executable when running from build
sys.argv.pop(0)

Expand Down
2 changes: 1 addition & 1 deletion tools/_venv_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_poetry_venv_root():

site.addsitedir(str(get_poetry_venv_root()))

from poetry.factory import Factory
from poetry.factory import Factory # noqa E402


def main():
Expand Down
Loading

0 comments on commit dd557f5

Please sign in to comment.