mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Add fixes after first PR
This commit is contained in:
parent
feae04f0c3
commit
521b56289d
7 changed files with 7 additions and 60 deletions
|
|
@ -1,19 +0,0 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,py}]
|
||||
charset = utf-8
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -100,3 +100,6 @@ website/.docusaurus
|
|||
|
||||
.poetry/
|
||||
.python-version
|
||||
.editorconfig
|
||||
.pre-commit-config.yaml
|
||||
mypy.ini
|
||||
|
|
|
|||
|
|
@ -1,26 +0,0 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: end-of-file-fixer
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: 21.4b0
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: "3"
|
||||
args:
|
||||
- "--config"
|
||||
- "./pyproject.toml"
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: "3.9.2" # pick a git hash / tag to point to
|
||||
hooks:
|
||||
- id: flake8
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: 'v0.902'
|
||||
hooks:
|
||||
- id: mypy
|
||||
args: [--no-strict-optional, --ignore-missing-imports]
|
||||
additional_dependencies: [tokenize-rt==3.2.0]
|
||||
5
mypy.ini
5
mypy.ini
|
|
@ -1,5 +0,0 @@
|
|||
[mypy]
|
||||
python_version = 3.7
|
||||
ignore_missing_imports = false
|
||||
check_untyped_defs = true
|
||||
follow_imports = silent
|
||||
|
|
@ -113,7 +113,6 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
|
|||
"celaction": [r".*"]}
|
||||
|
||||
enviro_filter = [
|
||||
"OPENPYPE_SG_USER",
|
||||
"FTRACK_API_USER",
|
||||
"FTRACK_API_KEY",
|
||||
"FTRACK_SERVER",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
from functools import lru_cache
|
||||
from typing import Tuple, Dict, List, Any
|
||||
|
||||
from pymongo import MongoClient
|
||||
|
|
@ -13,10 +14,12 @@ def get_project_list() -> List[str]:
|
|||
return db.list_collection_names()
|
||||
|
||||
|
||||
@lru_cache(maxsize=64)
|
||||
def get_shotgrid_project_settings(project: str) -> Dict[str, Any]:
|
||||
return get_project_settings(project).get(MODULE_NAME, {})
|
||||
|
||||
|
||||
@lru_cache(maxsize=64)
|
||||
def get_shotgrid_settings() -> Dict[str, Any]:
|
||||
return get_system_settings().get("modules", {}).get(MODULE_NAME, {})
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import shotgun_api3
|
|||
from shotgun_api3.shotgun import AuthenticationFault
|
||||
from openpype.lib import OpenPypeSettingsRegistry
|
||||
from openpype.api import get_project_settings, get_system_settings
|
||||
from openpype.modules.shotgrid.lib.settings import get_shotgrid_servers
|
||||
|
||||
|
||||
class CollectShotgridSession(pyblish.api.ContextPlugin):
|
||||
|
|
@ -114,15 +115,6 @@ def get_shotgrid_settings(project):
|
|||
return get_project_settings(project).get("shotgrid", {})
|
||||
|
||||
|
||||
def get_shotgrid_servers():
|
||||
return (
|
||||
get_system_settings()
|
||||
.get("modules", {})
|
||||
.get("shotgrid", {})
|
||||
.get("shotgrid_settings", {})
|
||||
)
|
||||
|
||||
|
||||
def get_login():
|
||||
reg = OpenPypeSettingsRegistry()
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue