Revision c83d17007b751fcfb9460bd5204cfd63ae3aa2b0 authored by AetherBreeze on 13 January 2022, 09:41:14 UTC, committed by GitHub on 13 January 2022, 09:41:14 UTC
* Add serveral flags to CLI & generalize CLI code definition.py: - Add use_zip_chunks, start_frame, stop_frame, and chunk_size as CLI flags - Rename --bug to --bug_tracker to be consistent with website and API - No longer include optional kwargs in all requests core.py: - Add a single loop to handle all kwargs for extensibility - Lump optional task_create args into kwargs for brevity * Add --bug as alias for --bug_tracker - Add back old --bug flag for backwards compatability * Update licence header Update licence header for core.py * Remove redundant parameter assignment - Remove hardcoded `image_quality` default value, as this is already handled by the argparse default value. * CHANGELOG entry for new CLI flags * CLI linting fixes - Several linting fixes for CLI * Fix CLI test - Re-add default image_quality in case task_create is called manually * Resolve changelog merge conflict * Update CHANGELOG.md Co-authored-by: Andrey Zhavoronkov <andrey.zhavoronkov@intel.com>
1 parent e9c00cd
.eslintrc.js
// Copyright (C) 2018-2022 Intel Corporation
//
// SPDX-License-Identifier: MIT
module.exports = {
root: true,
env: {
node: true,
browser: true,
es6: true,
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
},
ignorePatterns: [
'.eslintrc.js',
'lint-staged.config.js',
],
plugins: ['security', 'no-unsanitized', 'eslint-plugin-header', 'import'],
extends: [
'eslint:recommended', 'plugin:security/recommended', 'plugin:no-unsanitized/DOM',
'airbnb-base', 'plugin:import/errors', 'plugin:import/warnings',
'plugin:import/typescript',
],
rules: {
'header/header': [2, 'line', [{
pattern: ' {1}Copyright \\(C\\) (?:20\\d{2}-)?2022 Intel Corporation',
template: ' Copyright (C) 2022 Intel Corporation'
}, '', ' SPDX-License-Identifier: MIT']],
'no-plusplus': 0,
'no-continue': 0,
'no-console': 0,
'no-param-reassign': ['error', { 'props': false }],
'no-restricted-syntax': [0, { selector: 'ForOfStatement' }],
'no-await-in-loop': 0,
'indent': ['error', 4, { 'SwitchCase': 1 }],
'max-len': ['error', { code: 120, ignoreStrings: true }],
'func-names': 0,
'valid-typeof': 0,
'no-useless-constructor': 0, // sometimes constructor is necessary to generate right documentation in cvat-core
'quotes': ['error', 'single'],
'lines-between-class-members': 0,
'class-methods-use-this': 0,
'no-underscore-dangle': ['error', { allowAfterThis: true }],
'max-classes-per-file': 0,
'operator-linebreak': ['error', 'after'],
'newline-per-chained-call': 0,
'global-require': 0,
'arrow-parens': ['error', 'always'],
'security/detect-object-injection': 0, // the rule is relevant for user input data on the node.js environment
'import/order': ['error', {'groups': ['builtin', 'external', 'internal']}],
'import/prefer-default-export': 0, // works incorrect with interfaces
},
};
Computing file changes ...