diff options
author | krock21 <krock21@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:02 +0300 |
commit | 937a6bb8d7c82d8d9d717f2bf6ce6c592a443641 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c | |
parent | 4aae166b5d23fd02653919f43e2015cd636fa6fd (diff) | |
download | ydb-937a6bb8d7c82d8d9d717f2bf6ce6c592a443641.tar.gz |
Restoring authorship annotation for <krock21@yandex-team.ru>. Commit 2 of 2.
53 files changed, 775 insertions, 775 deletions
diff --git a/build/config/tests/flake8/flake8.conf b/build/config/tests/flake8/flake8.conf index 7ff9fe014a..8af22b5d4d 100644 --- a/build/config/tests/flake8/flake8.conf +++ b/build/config/tests/flake8/flake8.conf @@ -12,20 +12,20 @@ select = ignore = E122, # continuation line missing indentation or outdented - E123, # closing bracket does not match indentation of opening bracket's line + E123, # closing bracket does not match indentation of opening bracket's line E127, # continuation line over-indented for visual indent E131, # continuation line unaligned for hanging - E203, # whitespace before ':' + E203, # whitespace before ':' E225, # missing whitespace around operator E226, # missing whitespace around arithmetic operator - E24, # multiple spaces after ',' or tab after ',' + E24, # multiple spaces after ',' or tab after ',' E275, # missing whitespace after keyword E305, # expected 2 blank lines after end of function or class E306, # expected 1 blank line before a nested definition E402, # module level import not at top of file E722, # do not use bare except, specify exception instead E731, # do not assign a lambda expression, use a def - E741, # do not use variables named 'l', 'O', or 'I' + E741, # do not use variables named 'l', 'O', or 'I' F722, # syntax error in forward annotation diff --git a/build/platform/python/tests/test_common.py b/build/platform/python/tests/test_common.py index ad32fe8221..7a685330ea 100644 --- a/build/platform/python/tests/test_common.py +++ b/build/platform/python/tests/test_common.py @@ -4,7 +4,7 @@ import pytest from build.platform.python.tests import testlib -PYTHON_VERSIONS = ["2.7", "3.4", "3.5", "3.6"] # 3.7, 3.8 are not runnable +PYTHON_VERSIONS = ["2.7", "3.4", "3.5", "3.6"] # 3.7, 3.8 are not runnable @pytest.mark.parametrize("pyver", PYTHON_VERSIONS) @@ -17,15 +17,15 @@ def test_python_max_unicode_bytes(pyver): cmd = [testlib.get_python_bin(pyver), '-c', 'import sys; print(sys.maxunicode)'] maxunicode = subprocess.check_output(cmd, stderr=subprocess.STDOUT).decode('utf-8') assert int(maxunicode) > 65535, "Found UCS2 build" - - -@pytest.mark.parametrize("pyver", PYTHON_VERSIONS) -def test_python_imports(pyver): - imports = { - "2.7": ['pkg_resources'], - "3.4": [], - "3.5": ['pkg_resources'], - "3.6": [], - } - for imp in imports[pyver]: - subprocess.check_call([testlib.get_python_bin(pyver), '-c', 'import ' + imp]) + + +@pytest.mark.parametrize("pyver", PYTHON_VERSIONS) +def test_python_imports(pyver): + imports = { + "2.7": ['pkg_resources'], + "3.4": [], + "3.5": ['pkg_resources'], + "3.6": [], + } + for imp in imports[pyver]: + subprocess.check_call([testlib.get_python_bin(pyver), '-c', 'import ' + imp]) diff --git a/build/platform/python/tests/testlib.py b/build/platform/python/tests/testlib.py index 765e55aaa3..d12f2815d4 100644 --- a/build/platform/python/tests/testlib.py +++ b/build/platform/python/tests/testlib.py @@ -5,12 +5,12 @@ import yatest.common def get_python_bin(ver): - res_name = 'EXTERNAL_PYTHON{}_RESOURCE_GLOBAL'.format(ver.replace('.', '')) + res_name = 'EXTERNAL_PYTHON{}_RESOURCE_GLOBAL'.format(ver.replace('.', '')) gr = yatest.common.global_resources() if res_name in gr: bindir = os.path.join(gr[res_name], 'python', 'bin') - if ('python' + ver) in os.listdir(bindir): - return os.path.join(bindir, 'python' + ver) + if ('python' + ver) in os.listdir(bindir): + return os.path.join(bindir, 'python' + ver) return os.path.join(bindir, 'python') raise AssertionError("Resource '{}' is not available: {}".format(res_name, gr)) diff --git a/build/rules/flake8/README.md b/build/rules/flake8/README.md index 590a78c30c..1910c57d95 100644 --- a/build/rules/flake8/README.md +++ b/build/rules/flake8/README.md @@ -1,26 +1,26 @@ -#Flake8 migrations - -##migrations.yaml -Format: -``` -migrations: - plugin-1: - ignore: - - B102 - - S103 - - F401 - prefixes: - - devtools/ya - - ads - - quality - ignore-F123: - ignore: - - F123 - prefixes: - - devtools/ya - - devtools/d -``` -If arcadia-relative filepath startswith prefix from prefixes, then: - -1. ignore values will be added to flake8.conf ignore section - +#Flake8 migrations + +##migrations.yaml +Format: +``` +migrations: + plugin-1: + ignore: + - B102 + - S103 + - F401 + prefixes: + - devtools/ya + - ads + - quality + ignore-F123: + ignore: + - F123 + prefixes: + - devtools/ya + - devtools/d +``` +If arcadia-relative filepath startswith prefix from prefixes, then: + +1. ignore values will be added to flake8.conf ignore section + diff --git a/build/rules/flake8/migrations.yaml b/build/rules/flake8/migrations.yaml index 9e626404c5..6e54bf2e62 100644 --- a/build/rules/flake8/migrations.yaml +++ b/build/rules/flake8/migrations.yaml @@ -1,4 +1,4 @@ -migrations: +migrations: W605: ignore: - W605 @@ -1230,306 +1230,306 @@ migrations: - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_vocabulary - voicetech/asr/tools/language_model/tests/test_linear_merge - yabs/outdoor/viewer/back/logic - F401: - ignore: - - F401 - prefixes: - - ads/autobudget/ml_pipeline - - ads/factor_check/workflow/lib - - ads/libs/py_autobudget - - ads/libs/py_dssm_lib/dssm_applier - - ads/libs/py_ml_factors/matrixnet - - ads/libs/py_vw_lib - - ads/nirvana/automl/pipelines/offline_pytorch/full_example - - ads/nirvana/gensim_w2v - - ads/nirvana/mappers/w2v_recommender - - ads/quality/adv_machine/cm_robot/cmpy/fresh_stats - - ads/quality/adv_machine/cm_robot/cmpy/search_query_recom_attempt - - ads/quality/embedding/join_banners - - ads/quality/embedding/tsar_tensor/BSFACTOR-44/gram_eval - - ads/quality/embedding/tsar_tensor/BSFACTOR-44/preprocess - - ads/quality/ltp/action_tasks/visit_goals - - ads/quality/phf/direct_api - - ads/quality/simulate_auction_py/lib/inject_modules - - ads/sandbox_scripts/zc_corrector - - ads/tools/mx_feature_remapper/lib - - ads/watchman/contrib/flask-marshmallow-patched - - ads/watchman/contrib/flask-restplus-patched - - alice/analytics/wer - - alice/boltalka/generative/tfnn/infer - - alice/boltalka/generative/training/data/nn/filtered_twitter - - alice/nlu/py_libs/tokenizer - - alice/uniproxy/bin/send-digest - - alice/uniproxy/tools/perf_results_parser - - antirobot/tools/prepare_requests_cbb + F401: + ignore: + - F401 + prefixes: + - ads/autobudget/ml_pipeline + - ads/factor_check/workflow/lib + - ads/libs/py_autobudget + - ads/libs/py_dssm_lib/dssm_applier + - ads/libs/py_ml_factors/matrixnet + - ads/libs/py_vw_lib + - ads/nirvana/automl/pipelines/offline_pytorch/full_example + - ads/nirvana/gensim_w2v + - ads/nirvana/mappers/w2v_recommender + - ads/quality/adv_machine/cm_robot/cmpy/fresh_stats + - ads/quality/adv_machine/cm_robot/cmpy/search_query_recom_attempt + - ads/quality/embedding/join_banners + - ads/quality/embedding/tsar_tensor/BSFACTOR-44/gram_eval + - ads/quality/embedding/tsar_tensor/BSFACTOR-44/preprocess + - ads/quality/ltp/action_tasks/visit_goals + - ads/quality/phf/direct_api + - ads/quality/simulate_auction_py/lib/inject_modules + - ads/sandbox_scripts/zc_corrector + - ads/tools/mx_feature_remapper/lib + - ads/watchman/contrib/flask-marshmallow-patched + - ads/watchman/contrib/flask-restplus-patched + - alice/analytics/wer + - alice/boltalka/generative/tfnn/infer + - alice/boltalka/generative/training/data/nn/filtered_twitter + - alice/nlu/py_libs/tokenizer + - alice/uniproxy/bin/send-digest + - alice/uniproxy/tools/perf_results_parser + - antirobot/tools/prepare_requests_cbb - browser/infra/services/ci/backend/flakiness/migrations - - cv/imageproc/ocr/tools/nirvana/captcha_renderer - - cv/short2long/nirvana/lib - - cv/short2long/training/yt_load_highlights - - dict/mt/analytics/make/tools/toloka/simple_toloka - - dict/mt/make/modules/prepare_corpus - - dict/mt/make/pipeline/nmt - - dict/mt/make/pipeline/phrase_lm/tests - - dict/mt/make/tools/yt_transform/tests - - dict/mt/normalizer/tts/bugfix - - dict/ontodb/config - - dict/ontodb/proto/benchmark - - dict/ontodb/proto/direct/ut - - dict/ontodb/proto/tools - - direct/infra/dt-dump-b2yt-data - - drive/analytics/binary/thiefs - - education/lib/contrib/glove_python - - education/schoolbook/services/recommender/app - - education/schoolbook/services/recommender/it - - entity/ontodb/tasks/vloggers - - entity/ontodb/util/yt_helpers - - entity/recommender/nirvana/operations/yam/yam_positions - - entity/recommender/tools/recommender_beta - - entity/ugc/robot/tools/installed_apps_sites_activity_loader/lib - - ether/top/check_docs - - ether/top/specevent/meta - - extsearch/geo/recommender/tools/build_static_user_profile/lib - - extsearch/geo/recommender/tools/quality_metric/convert_tradoff_4_plot - - extsearch/geo/recommender/tools/quality_metric/tradeoff/generate_features - - extsearch/geo/recommender/tools/quality_metric/tradeoff/prepare_searches - - extsearch/geo/recommender/tools/quality_metric/utils - - extsearch/geo/recommender/tools/ugc_rtmr_processing/tests - - extsearch/images/robot/scripts/cm/semidup2 - - extsearch/images/tools/morda_popular_queries/bin - - extsearch/images/tools/new_runtime/create_model - - extsearch/video/robot/cm/crawl/cmpy/authors - - extsearch/video/robot/cm/transcoder/cmpy/vh_index_dups_matcher - - extsearch/video/robot/cm/vicont/cmpy/content - - extsearch/video/robot/cm/vicont/cmpy/renew - - extsearch/video/robot/crawling/player_testing/core - - extsearch/video/robot/crawling/player_testing/services/live_capture - - extsearch/video/robot/crawling/player_testing/services/live_proxy - - extsearch/video/robot/previews/hitman/lost_preview_status - - extsearch/ymusic/tools/crawl_test_data - - extsearch/ymusic/tools/generate_test_data - - infra/kernel/test/recipe/cgleak_check/example - - infra/yasm/zoom/python/tests - - infra/yp_quota_distributor/lib - - intranet/table_flow/tests - - lbs/research_tools/find_keys_causing_losses - - library/python/async_clients - - logbroker/tools/deploy_consistency_test - - mail/github/calendar-attach-processor - - maps/automotive/carwashes/tests/fake-env - - maps/automotive/carwashes/tests/src - - maps/automotive/proxy/config_generator - - maps/automotive/remote_tasks/autotests/tests - - maps/automotive/remote_tasks/manager/regression/ammo_generator - - maps/b2bgeo/tools/load_testing/lib - - maps/doc/proto/yandex/maps/proto/factory/tests - - maps/infopoint/statistics/lib - - maps/infra/apiteka/client/tests - - maps/infra/ecstatic/tool/ecstatic_api - - maps/pylibs/test_helpers - - maps/qa/passed_by_assessors/markup_script - - maps/wikimap/stat/kpi/valuable_edits/users_home_regions/lib - - maps_adv/common/shared_mock - - market/dynamic_pricing/tools/kvi_evaluation - - market/dynamic_pricing/tools/offline_modeling - - market/mobile_validator/mt - - market/seo/tools/postgres_local/recipe - - market/yamarec/yamarec/yamarec1 - - mds/nscfg/server - - metrika/admin/python/cms/agent/lib - - metrika/core/monitoring/clickhouse-table-structure-check - - metrika/core/programs/mobile_yt_to_yc_export - - metrika/pylib/log/tests - - metrika/tasklets/build/impl - - metrika/tasklets/deploy/impl - - ml/tensorflow/tfnn/tests/tools - - ml/tensorflow/ytensorflow - - modadvert/libs/antispam/threat_mapping/ut - - modadvert/libs/jsonrpc2/client - - modadvert/libs/nirvana/program - - modadvert/nirvana/m1_update_media_objects/it - - modadvert/programs/multik/libs - - modadvert/programs/supermoderation_admin/libs/services - - opensource/sync/bin/docs_sync/tasklet - - opensource/sync/bin/sync_ch/tasklet - - orgvisits/orgs/preprocessing/lib - - orgvisits/user/features/run/tests - - plus/oneyear/oneyear_by - - quality/ab_testing/cofe/projects/alice - - quality/ab_testing/cofe/projects/router - - quality/ab_testing/cofe/projects/zalogin - - quality/ab_testing/cofe/python/metrics - - quality/functionality/chats/common/bunker_client - - quality/functionality/chats/common/requests_wrappers - - quality/functionality/chats/feedback/src/feedback/api - - quality/functionality/chats/floyd/src/floyd/core - - quality/functionality/entity_search/factqueries/tools/beta/start - - quality/functionality/rtx/trends/apropos_viewer - - quality/functionality/scripts/psuh/HomeWorkMetricsLib/External/autolog_names/autolog_names - - quality/functionality/scripts/psuh/HomeWorkMetricsLib/HomeWorkMetricsLib - - quality/functionality/turbo/analytics/quality/samplers/cms_sampler - - quality/functionality/turbo/ml_ads/prepare_daily_logs - - quality/functionality/turbo/tools/rthub_dev/prepare_autoparser - - quality/functionality/turbo/yml_process/lib - - quality/neural_net/bert/bert - - quality/nirvana_tools/conveyor_operations/concatenate_tables - - quality/nirvana_tools/conveyor_operations/merge_gemini_lookups - - quasar/infra/tasklets/update_devices_in_db/impl - - regulargeo/geolayer/olap - - robot/bert/tools/predict_diff - - robot/quality/crawl_quality_metrics/push_to_solomon_every_day_crawl - - robot/quality/crawl_quality_metrics/push_to_solomon_library - - robot/quality/nirvana/refererrank/calc_scores_map - - robot/quality/nirvana/refererrank/create_dataset - - robot/quality/nirvana/refererrank/drop_large_keys - - robot/quality/nirvana/refererrank/join_addtime - - robot/quality/nirvana/refererrank/join_userdata_to_referers - - robot/quality/nirvana/refererrank/merge_all_crawl_attempts - - robot/quality/nirvana/refererrank/merge_all_factors_tables - - robot/quality/nirvana/refererrank/merge_all_referers_export - - robot/quality/nirvana/refererrank/premetric_map - - robot/quality/nirvana/refererrank/prepare_for_crawl_attempt_reduce - - robot/quality/nirvana/refererrank/prepare_for_factors_reduce - - robot/quality/nirvana/refererrank/prepare_for_userdata_reduce - - robot/quality/nirvana/refererrank/push_referer_rank_to_solomon - - robot/quality/nirvana/refererrank/rename_url_key - - robot/quality/nirvana/refererrank/unique_referers - - robot/quality/nirvana/refererrank/unique_urls - - robot/quality/robotrank/nirvana/compare_formulas - - robot/selectionrank/sr_conduct_rules_experiment/graphs - - rtmapreduce/config/user_tasks - - saas/tools/refresh/import_rtyserver - - sandbox/projects/EntitySearch/EntitySearchTrunkTest - - sandbox/projects/GetGeoMetasearchResponses - - sandbox/projects/LandingConstructor - - sandbox/projects/adfox/adfox_ui/resource_types - - sandbox/projects/adv_machine/make_turboapp_dicts - - sandbox/projects/avia/import_marker - - sandbox/projects/avia/trigger_revise - - sandbox/projects/cloud/billing/build_analytics_cube/source - - sandbox/projects/cmnt/PumpkinSettings - - sandbox/projects/dj/AutoDeploy - - sandbox/projects/gencfg/GencfgChartsUploadGroupsInfoToYt - - sandbox/projects/mail/Load/FuritaAmmoGen - - sandbox/projects/mail/Load/FuritaShooting - - sandbox/projects/mail/Load/LizaShooting - - sandbox/projects/mail/Load/MobileApiShooting - - sandbox/projects/mail/Load/QuinnShooting - - sandbox/projects/mail/Load/WebApiShooting - - sandbox/projects/mail/RotateMailNotifyRules - - sandbox/projects/marty - - sandbox/projects/mssngr/runtime/MssngrRouterLoadTest - - sandbox/projects/news - - sandbox/projects/quality/tasks - - sandbox/projects/resource_types - - sandbox/projects/school/Load/MeduzaShooting - - sandbox/projects/sdc - - sandbox/projects/smarttv - - sandbox/projects/taxi/BuildDispatcherPackage - - sandbox/projects/wmc - - sandbox/projects/yphone/AdvisorDeployToQloud - - sandbox/projects/yphone/JafarBuildNirvanaLayer - - sandbox/projects/yphone/launcher - - search/alice/snippets/lib/util/parse_arc - - search/geo/tools/collections/make_expert_collections - - search/geo/tools/geocube/lib - - search/mon/rviewer/app - - search/mon/rviewer/db - - search/mon/rviewer/modules/clients - - search/mon/rviewer/modules/config - - search/mon/rviewer/modules/nanny - - search/mon/rviewer/modules/orchestrator - - search/mon/rviewer/modules/yt - - search/mon/uchenki/app - - search/mon/wabbajack/libs/db - - search/resonance/tester/core - - search/scraper_over_yt/scripts/zombie_monitors - - sprav/altay/tools/auto_close/ml_predictor - - sprav/mining/bs/tools/extract_social_data - - sprav/tycoon/nirvana/mail/sync_subscriptions/lib - - statbox/qb2 - - statbox/statkey/jam/actions - - statbox/statkey/jam/jobs/key_reports/desktop_retention - - statbox/statkey/jam/jobs/tech_report/event_money_stat - - statbox/statkey/jam/libs - - tools/mkdocs_builder/lib - - tools/releaser/src - - travel/avia/avia_api - - travel/avia/library/python/iata_correction - - travel/avia/shared_flights/data_importer - - travel/library/python/sender - - vcs/svn/migrations - - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_freq_table - - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_mixture_model - - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_model - - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_lambda - - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_vocabulary - - voicetech/asr/markup/lib - - voicetech/asr/pipeline/train - - voicetech/asr/tools/question/make_train_from_vt - - voicetech/asr/tools/regular_metrics_run/upload_metrics_to_yt - - voicetech/bio/pipeline/classification/run_children_toloka_markup_regular - - voicetech/bio/pipeline/vh - - voicetech/bio/scripts/score/robin_metrics/classification/tests - - voicetech/bio/scripts/yt/make_transaction - - voicetech/common/voicetable/agency_data_parser/lib - - voicetech/spotter/difftools/score_output - - voicetech/spotter/online_metrics/lib - - voicetech/spotter/run/difftool - - voicetech/spotter/score/prepare_for_online_validation/bin - - weather/workers/warnings/general - - weather/workers/warnings/nowcasting - - yabs/analytics/anomaly_analyzer/src - - yabs/awaps_pvl/pvl/logic - - yabs/indoor/mocks_generator/lib - - yabs/outdoor/event_2018/python/lib - - yabs/outdoor/libs/facepp_api - - yabs/outdoor/mobile_internet_proxy/logic - - yabs/outdoor/py_schedule/logic - - yabs/outdoor/scripts/raskraska - - yabs/outdoor/viewer/back/logic - - yabs/qa/oneshots/idoldin/BSSERVER-12201 - - yabs/qa/oneshots/liapustin/BSSERVER-14049 - - yabs/qa/oneshots/sergtaim/BSSERVER-14259/AddKeywordToYT-Via-Simple-IudYtOneshot - - yabs/qa/oneshots/serval/BSSERVER-14292/first_json_option_new - - yabs/sbyt/ytstatcollector/advmachine/tests - - yabs/server/cs/pylibs/advmachine_export - - yabs/server/cs/test/cs_import/yt_banner_with_history - - yabs/server/infra/yt_tables_freshness/solo - - yabs/server/libs/py_db_cluster - - yabs/server/test/ft/BSSERVER-13708 - - yabs/server/test/ft/BSSERVER-13878 - - yabs/server/test/ft/BSSERVER-14107 - - yabs/server/test/ft/BSSERVER-14110 - - yabs/server/test/ft/BSSERVER-14309 - - yabs/server/test/ft/BSSERVER-2495 - - yabs/server/test/qabs_bsserver_pytest - - yabs/utils/log_stats/test - - yabs/vh/cms-pgaas/cms_common - - yabs/vh/cms-pgaas/sport_api_importer/sport_api_importer_lib/lib/sport_client - - yabs/vh/cms-pgaas/statistics_api - - yabs/vh/cms-pgaas/ugc_api - - yabs/vh/cms-pgaas/utils/external_services/sender - - yabs/vh/frontend/json_templating/streams_generator/pylib - - yaphone/advisor/launcher - - ydo/database/lib - - ydo/payments/balance_notifications_processor/lib - - ydo/server/apphost_source/lib/endpoints - - ydo/tools/direct/make_ya_clients_export + - cv/imageproc/ocr/tools/nirvana/captcha_renderer + - cv/short2long/nirvana/lib + - cv/short2long/training/yt_load_highlights + - dict/mt/analytics/make/tools/toloka/simple_toloka + - dict/mt/make/modules/prepare_corpus + - dict/mt/make/pipeline/nmt + - dict/mt/make/pipeline/phrase_lm/tests + - dict/mt/make/tools/yt_transform/tests + - dict/mt/normalizer/tts/bugfix + - dict/ontodb/config + - dict/ontodb/proto/benchmark + - dict/ontodb/proto/direct/ut + - dict/ontodb/proto/tools + - direct/infra/dt-dump-b2yt-data + - drive/analytics/binary/thiefs + - education/lib/contrib/glove_python + - education/schoolbook/services/recommender/app + - education/schoolbook/services/recommender/it + - entity/ontodb/tasks/vloggers + - entity/ontodb/util/yt_helpers + - entity/recommender/nirvana/operations/yam/yam_positions + - entity/recommender/tools/recommender_beta + - entity/ugc/robot/tools/installed_apps_sites_activity_loader/lib + - ether/top/check_docs + - ether/top/specevent/meta + - extsearch/geo/recommender/tools/build_static_user_profile/lib + - extsearch/geo/recommender/tools/quality_metric/convert_tradoff_4_plot + - extsearch/geo/recommender/tools/quality_metric/tradeoff/generate_features + - extsearch/geo/recommender/tools/quality_metric/tradeoff/prepare_searches + - extsearch/geo/recommender/tools/quality_metric/utils + - extsearch/geo/recommender/tools/ugc_rtmr_processing/tests + - extsearch/images/robot/scripts/cm/semidup2 + - extsearch/images/tools/morda_popular_queries/bin + - extsearch/images/tools/new_runtime/create_model + - extsearch/video/robot/cm/crawl/cmpy/authors + - extsearch/video/robot/cm/transcoder/cmpy/vh_index_dups_matcher + - extsearch/video/robot/cm/vicont/cmpy/content + - extsearch/video/robot/cm/vicont/cmpy/renew + - extsearch/video/robot/crawling/player_testing/core + - extsearch/video/robot/crawling/player_testing/services/live_capture + - extsearch/video/robot/crawling/player_testing/services/live_proxy + - extsearch/video/robot/previews/hitman/lost_preview_status + - extsearch/ymusic/tools/crawl_test_data + - extsearch/ymusic/tools/generate_test_data + - infra/kernel/test/recipe/cgleak_check/example + - infra/yasm/zoom/python/tests + - infra/yp_quota_distributor/lib + - intranet/table_flow/tests + - lbs/research_tools/find_keys_causing_losses + - library/python/async_clients + - logbroker/tools/deploy_consistency_test + - mail/github/calendar-attach-processor + - maps/automotive/carwashes/tests/fake-env + - maps/automotive/carwashes/tests/src + - maps/automotive/proxy/config_generator + - maps/automotive/remote_tasks/autotests/tests + - maps/automotive/remote_tasks/manager/regression/ammo_generator + - maps/b2bgeo/tools/load_testing/lib + - maps/doc/proto/yandex/maps/proto/factory/tests + - maps/infopoint/statistics/lib + - maps/infra/apiteka/client/tests + - maps/infra/ecstatic/tool/ecstatic_api + - maps/pylibs/test_helpers + - maps/qa/passed_by_assessors/markup_script + - maps/wikimap/stat/kpi/valuable_edits/users_home_regions/lib + - maps_adv/common/shared_mock + - market/dynamic_pricing/tools/kvi_evaluation + - market/dynamic_pricing/tools/offline_modeling + - market/mobile_validator/mt + - market/seo/tools/postgres_local/recipe + - market/yamarec/yamarec/yamarec1 + - mds/nscfg/server + - metrika/admin/python/cms/agent/lib + - metrika/core/monitoring/clickhouse-table-structure-check + - metrika/core/programs/mobile_yt_to_yc_export + - metrika/pylib/log/tests + - metrika/tasklets/build/impl + - metrika/tasklets/deploy/impl + - ml/tensorflow/tfnn/tests/tools + - ml/tensorflow/ytensorflow + - modadvert/libs/antispam/threat_mapping/ut + - modadvert/libs/jsonrpc2/client + - modadvert/libs/nirvana/program + - modadvert/nirvana/m1_update_media_objects/it + - modadvert/programs/multik/libs + - modadvert/programs/supermoderation_admin/libs/services + - opensource/sync/bin/docs_sync/tasklet + - opensource/sync/bin/sync_ch/tasklet + - orgvisits/orgs/preprocessing/lib + - orgvisits/user/features/run/tests + - plus/oneyear/oneyear_by + - quality/ab_testing/cofe/projects/alice + - quality/ab_testing/cofe/projects/router + - quality/ab_testing/cofe/projects/zalogin + - quality/ab_testing/cofe/python/metrics + - quality/functionality/chats/common/bunker_client + - quality/functionality/chats/common/requests_wrappers + - quality/functionality/chats/feedback/src/feedback/api + - quality/functionality/chats/floyd/src/floyd/core + - quality/functionality/entity_search/factqueries/tools/beta/start + - quality/functionality/rtx/trends/apropos_viewer + - quality/functionality/scripts/psuh/HomeWorkMetricsLib/External/autolog_names/autolog_names + - quality/functionality/scripts/psuh/HomeWorkMetricsLib/HomeWorkMetricsLib + - quality/functionality/turbo/analytics/quality/samplers/cms_sampler + - quality/functionality/turbo/ml_ads/prepare_daily_logs + - quality/functionality/turbo/tools/rthub_dev/prepare_autoparser + - quality/functionality/turbo/yml_process/lib + - quality/neural_net/bert/bert + - quality/nirvana_tools/conveyor_operations/concatenate_tables + - quality/nirvana_tools/conveyor_operations/merge_gemini_lookups + - quasar/infra/tasklets/update_devices_in_db/impl + - regulargeo/geolayer/olap + - robot/bert/tools/predict_diff + - robot/quality/crawl_quality_metrics/push_to_solomon_every_day_crawl + - robot/quality/crawl_quality_metrics/push_to_solomon_library + - robot/quality/nirvana/refererrank/calc_scores_map + - robot/quality/nirvana/refererrank/create_dataset + - robot/quality/nirvana/refererrank/drop_large_keys + - robot/quality/nirvana/refererrank/join_addtime + - robot/quality/nirvana/refererrank/join_userdata_to_referers + - robot/quality/nirvana/refererrank/merge_all_crawl_attempts + - robot/quality/nirvana/refererrank/merge_all_factors_tables + - robot/quality/nirvana/refererrank/merge_all_referers_export + - robot/quality/nirvana/refererrank/premetric_map + - robot/quality/nirvana/refererrank/prepare_for_crawl_attempt_reduce + - robot/quality/nirvana/refererrank/prepare_for_factors_reduce + - robot/quality/nirvana/refererrank/prepare_for_userdata_reduce + - robot/quality/nirvana/refererrank/push_referer_rank_to_solomon + - robot/quality/nirvana/refererrank/rename_url_key + - robot/quality/nirvana/refererrank/unique_referers + - robot/quality/nirvana/refererrank/unique_urls + - robot/quality/robotrank/nirvana/compare_formulas + - robot/selectionrank/sr_conduct_rules_experiment/graphs + - rtmapreduce/config/user_tasks + - saas/tools/refresh/import_rtyserver + - sandbox/projects/EntitySearch/EntitySearchTrunkTest + - sandbox/projects/GetGeoMetasearchResponses + - sandbox/projects/LandingConstructor + - sandbox/projects/adfox/adfox_ui/resource_types + - sandbox/projects/adv_machine/make_turboapp_dicts + - sandbox/projects/avia/import_marker + - sandbox/projects/avia/trigger_revise + - sandbox/projects/cloud/billing/build_analytics_cube/source + - sandbox/projects/cmnt/PumpkinSettings + - sandbox/projects/dj/AutoDeploy + - sandbox/projects/gencfg/GencfgChartsUploadGroupsInfoToYt + - sandbox/projects/mail/Load/FuritaAmmoGen + - sandbox/projects/mail/Load/FuritaShooting + - sandbox/projects/mail/Load/LizaShooting + - sandbox/projects/mail/Load/MobileApiShooting + - sandbox/projects/mail/Load/QuinnShooting + - sandbox/projects/mail/Load/WebApiShooting + - sandbox/projects/mail/RotateMailNotifyRules + - sandbox/projects/marty + - sandbox/projects/mssngr/runtime/MssngrRouterLoadTest + - sandbox/projects/news + - sandbox/projects/quality/tasks + - sandbox/projects/resource_types + - sandbox/projects/school/Load/MeduzaShooting + - sandbox/projects/sdc + - sandbox/projects/smarttv + - sandbox/projects/taxi/BuildDispatcherPackage + - sandbox/projects/wmc + - sandbox/projects/yphone/AdvisorDeployToQloud + - sandbox/projects/yphone/JafarBuildNirvanaLayer + - sandbox/projects/yphone/launcher + - search/alice/snippets/lib/util/parse_arc + - search/geo/tools/collections/make_expert_collections + - search/geo/tools/geocube/lib + - search/mon/rviewer/app + - search/mon/rviewer/db + - search/mon/rviewer/modules/clients + - search/mon/rviewer/modules/config + - search/mon/rviewer/modules/nanny + - search/mon/rviewer/modules/orchestrator + - search/mon/rviewer/modules/yt + - search/mon/uchenki/app + - search/mon/wabbajack/libs/db + - search/resonance/tester/core + - search/scraper_over_yt/scripts/zombie_monitors + - sprav/altay/tools/auto_close/ml_predictor + - sprav/mining/bs/tools/extract_social_data + - sprav/tycoon/nirvana/mail/sync_subscriptions/lib + - statbox/qb2 + - statbox/statkey/jam/actions + - statbox/statkey/jam/jobs/key_reports/desktop_retention + - statbox/statkey/jam/jobs/tech_report/event_money_stat + - statbox/statkey/jam/libs + - tools/mkdocs_builder/lib + - tools/releaser/src + - travel/avia/avia_api + - travel/avia/library/python/iata_correction + - travel/avia/shared_flights/data_importer + - travel/library/python/sender + - vcs/svn/migrations + - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_freq_table + - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_mixture_model + - voicetech/asr/core/lib/subword_ngram_lm/nirvana/build_model + - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_lambda + - voicetech/asr/core/lib/subword_ngram_lm/nirvana/fit_vocabulary + - voicetech/asr/markup/lib + - voicetech/asr/pipeline/train + - voicetech/asr/tools/question/make_train_from_vt + - voicetech/asr/tools/regular_metrics_run/upload_metrics_to_yt + - voicetech/bio/pipeline/classification/run_children_toloka_markup_regular + - voicetech/bio/pipeline/vh + - voicetech/bio/scripts/score/robin_metrics/classification/tests + - voicetech/bio/scripts/yt/make_transaction + - voicetech/common/voicetable/agency_data_parser/lib + - voicetech/spotter/difftools/score_output + - voicetech/spotter/online_metrics/lib + - voicetech/spotter/run/difftool + - voicetech/spotter/score/prepare_for_online_validation/bin + - weather/workers/warnings/general + - weather/workers/warnings/nowcasting + - yabs/analytics/anomaly_analyzer/src + - yabs/awaps_pvl/pvl/logic + - yabs/indoor/mocks_generator/lib + - yabs/outdoor/event_2018/python/lib + - yabs/outdoor/libs/facepp_api + - yabs/outdoor/mobile_internet_proxy/logic + - yabs/outdoor/py_schedule/logic + - yabs/outdoor/scripts/raskraska + - yabs/outdoor/viewer/back/logic + - yabs/qa/oneshots/idoldin/BSSERVER-12201 + - yabs/qa/oneshots/liapustin/BSSERVER-14049 + - yabs/qa/oneshots/sergtaim/BSSERVER-14259/AddKeywordToYT-Via-Simple-IudYtOneshot + - yabs/qa/oneshots/serval/BSSERVER-14292/first_json_option_new + - yabs/sbyt/ytstatcollector/advmachine/tests + - yabs/server/cs/pylibs/advmachine_export + - yabs/server/cs/test/cs_import/yt_banner_with_history + - yabs/server/infra/yt_tables_freshness/solo + - yabs/server/libs/py_db_cluster + - yabs/server/test/ft/BSSERVER-13708 + - yabs/server/test/ft/BSSERVER-13878 + - yabs/server/test/ft/BSSERVER-14107 + - yabs/server/test/ft/BSSERVER-14110 + - yabs/server/test/ft/BSSERVER-14309 + - yabs/server/test/ft/BSSERVER-2495 + - yabs/server/test/qabs_bsserver_pytest + - yabs/utils/log_stats/test + - yabs/vh/cms-pgaas/cms_common + - yabs/vh/cms-pgaas/sport_api_importer/sport_api_importer_lib/lib/sport_client + - yabs/vh/cms-pgaas/statistics_api + - yabs/vh/cms-pgaas/ugc_api + - yabs/vh/cms-pgaas/utils/external_services/sender + - yabs/vh/frontend/json_templating/streams_generator/pylib + - yaphone/advisor/launcher + - ydo/database/lib + - ydo/payments/balance_notifications_processor/lib + - ydo/server/apphost_source/lib/endpoints + - ydo/tools/direct/make_ya_clients_export - yp/eviction_alerter/bin - - yp/scheduler_simulator/analysis/library - - yql/library/test_framework - - yweb/antimalware/mitb/mitb_monitor/lib - - yweb/antiporno/cp_conv/text_classif/bin - - yweb/antispam/clean_web/router - - yweb/antispam/mascot/monitorings/check_table_age - - yweb/robot/limbo - - yweb/robot/metrics/pmusca/graph/bin/extract_urls_from_serp - - yweb/sitelinks/scripts/sitelinks - - yweb/webscripts/video/duplicates/nirvana_scripts/knn/filter_knn_source - - yweb/yasap/answers/answers - - yweb/yasap/pdb/tools/add_card_owners - - zootopia/analytics/drive/source/drive/operations/support/registrations/reg_quality - - zootopia/analytics/ml/features/geo_features/faster_surge_features + - yp/scheduler_simulator/analysis/library + - yql/library/test_framework + - yweb/antimalware/mitb/mitb_monitor/lib + - yweb/antiporno/cp_conv/text_classif/bin + - yweb/antispam/clean_web/router + - yweb/antispam/mascot/monitorings/check_table_age + - yweb/robot/limbo + - yweb/robot/metrics/pmusca/graph/bin/extract_urls_from_serp + - yweb/sitelinks/scripts/sitelinks + - yweb/webscripts/video/duplicates/nirvana_scripts/knn/filter_knn_source + - yweb/yasap/answers/answers + - yweb/yasap/pdb/tools/add_card_owners + - zootopia/analytics/drive/source/drive/operations/support/registrations/reg_quality + - zootopia/analytics/ml/features/geo_features/faster_surge_features F405: ignore: - F405 diff --git a/build/rules/flake8/ya.make b/build/rules/flake8/ya.make index 7ce4d64fd7..c77a54d621 100644 --- a/build/rules/flake8/ya.make +++ b/build/rules/flake8/ya.make @@ -1 +1 @@ -OWNER(g:yatest g:python-contrib) +OWNER(g:yatest g:python-contrib) diff --git a/build/ya.conf.json b/build/ya.conf.json index 20411703e7..5f7cc875d6 100644 --- a/build/ya.conf.json +++ b/build/ya.conf.json @@ -441,8 +441,8 @@ }, "ya_sed": { "description": "This tool simplifies replacing of some text in Arcadia" - }, - "black": { + }, + "black": { "description": "Python styler, Python 3 only" }, "black_py2": { @@ -5413,32 +5413,32 @@ "default": true } ] - }, - "black": { - "tools": { - "black": { - "bottle": "black", - "executable": "black" - } - }, - "platforms": [ - { - "host": { - "os": "LINUX" - }, - "default": true - }, - { - "host": { - "os": "WIN" - }, - "default": true - }, - { - "host": { - "os": "DARWIN" - }, - "default": true + }, + "black": { + "tools": { + "black": { + "bottle": "black", + "executable": "black" + } + }, + "platforms": [ + { + "host": { + "os": "LINUX" + }, + "default": true + }, + { + "host": { + "os": "WIN" + }, + "default": true + }, + { + "host": { + "os": "DARWIN" + }, + "default": true }, { "host": { @@ -5446,8 +5446,8 @@ "arch": "arm64" }, "default": true - } - ] + } + ] }, "black_py2": { "tools": { @@ -7814,19 +7814,19 @@ "ya_sed" ] } - }, - "black": { - "formula": { - "sandbox_id": [ + }, + "black": { + "formula": { + "sandbox_id": [ 1209137306 - ], - "match": "black" - }, - "executable": { - "black": [ - "black" - ] - } + ], + "match": "black" + }, + "executable": { + "black": [ + "black" + ] + } }, "black_py2": { "formula": { diff --git a/build/ymake.core.conf b/build/ymake.core.conf index 530c2f7e87..081833998b 100644 --- a/build/ymake.core.conf +++ b/build/ymake.core.conf @@ -2134,13 +2134,13 @@ macro LINT(level) { } # tag:python-specific tag:test -### @usage: NO_DOCTESTS() -### -### Disable doctests in PY[|3|23_]TEST -macro NO_DOCTESTS() { - ENV(YA_PYTEST_DISABLE_DOCTEST="yes") -} - +### @usage: NO_DOCTESTS() +### +### Disable doctests in PY[|3|23_]TEST +macro NO_DOCTESTS() { + ENV(YA_PYTEST_DISABLE_DOCTEST="yes") +} + # tag:python-specific tag:test ### @usage: _BASE_PYTEST # internal ### @@ -2148,7 +2148,7 @@ macro NO_DOCTESTS() { module _BASE_PYTEST: _BASE_PY_PROGRAM { .NODE_TYPE=Program .FINAL_TARGET=no - .ALLOWED=YT_SPEC NO_DOCTESTS + .ALLOWED=YT_SPEC NO_DOCTESTS when ($USE_ARCADIA_PYTHON == "yes") { PEERDIR+=library/python/pytest } @@ -2197,7 +2197,7 @@ module PY2TEST: PYTEST_BIN { module PY3TEST_BIN: _BASE_PY3_PROGRAM { .NODE_TYPE=Program .FINAL_TARGET=no - .ALLOWED=YT_SPEC NO_DOCTESTS + .ALLOWED=YT_SPEC NO_DOCTESTS SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS canondata/result.json) SET(MODULE_LANG PY3) SETUP_PYTEST_BIN() diff --git a/contrib/libs/ya.make b/contrib/libs/ya.make index bcc76d2be2..9c4640fdcf 100644 --- a/contrib/libs/ya.make +++ b/contrib/libs/ya.make @@ -168,7 +168,7 @@ RECURSE( libogg libopendkim libopendmarc - libosmium + libosmium libphonenumber libpng libpq diff --git a/contrib/python/ya.make b/contrib/python/ya.make index 4a33416d8e..d01ced9f3a 100644 --- a/contrib/python/ya.make +++ b/contrib/python/ya.make @@ -110,7 +110,7 @@ RECURSE( bincopy biplist bitarray - black + black bleach blinker blis @@ -721,7 +721,7 @@ RECURSE( patched path.py pathlib2 - pathspec + pathspec pathtools pathy patsy diff --git a/contrib/restricted/ya.make b/contrib/restricted/ya.make index 469c6fe98d..b52a206733 100644 --- a/contrib/restricted/ya.make +++ b/contrib/restricted/ya.make @@ -49,7 +49,7 @@ RECURSE( patched protobuf-c protoc-c - protozero + protozero range-v3 rnnoise rubberband diff --git a/library/cpp/blockcodecs/codecs_ut.cpp b/library/cpp/blockcodecs/codecs_ut.cpp index 9f56d0d89f..bfe5a23690 100644 --- a/library/cpp/blockcodecs/codecs_ut.cpp +++ b/library/cpp/blockcodecs/codecs_ut.cpp @@ -59,7 +59,7 @@ Y_UNIT_TEST_SUITE(TBlockCodecsTest) { d.AsString(res); UNIT_ASSERT_EQUAL(NBlockCodecs::TData(res), NBlockCodecs::TData(data)); } catch (...) { - Cerr << c->Name() << "(" << res.Quote() << ")(" << TString{NBlockCodecs::TData(data)}.Quote() << ")" << Endl; + Cerr << c->Name() << "(" << res.Quote() << ")(" << TString{NBlockCodecs::TData(data)}.Quote() << ")" << Endl; throw; } diff --git a/library/cpp/charset/ci_string.cpp b/library/cpp/charset/ci_string.cpp index dcd1dbf9e1..6097e40131 100644 --- a/library/cpp/charset/ci_string.cpp +++ b/library/cpp/charset/ci_string.cpp @@ -12,20 +12,20 @@ int TCiString::compare(const TCiString& s1, const char* p, const CodePage& cp) { return cp.stricmp(s1.data(), p); } -int TCiString::compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp) { - int rv = cp.strnicmp(p1.data(), p2.data(), Min(p1.size(), p2.size())); - return rv ? rv : p1.size() < p2.size() ? -1 : p1.size() == p2.size() ? 0 : 1; +int TCiString::compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp) { + int rv = cp.strnicmp(p1.data(), p2.data(), Min(p1.size(), p2.size())); + return rv ? rv : p1.size() < p2.size() ? -1 : p1.size() == p2.size() ? 0 : 1; } -bool TCiString::is_prefix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { - size_t len = what.size(); - return len <= of.size() && cp.strnicmp(what.data(), of.data(), len) == 0; +bool TCiString::is_prefix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { + size_t len = what.size(); + return len <= of.size() && cp.strnicmp(what.data(), of.data(), len) == 0; } -bool TCiString::is_suffix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { - size_t len = what.size(); - size_t slen = of.size(); - return (len <= slen) && (0 == cp.strnicmp(what.data(), of.data() + slen - len, len)); +bool TCiString::is_suffix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp) { + size_t len = what.size(); + size_t slen = of.size(); + return (len <= slen) && (0 == cp.strnicmp(what.data(), of.data() + slen - len, len)); } size_t TCiString::hashVal(const char* s, size_t len, const CodePage& cp) { diff --git a/library/cpp/charset/ci_string.h b/library/cpp/charset/ci_string.h index 2c61f5ca76..edf24c1b6f 100644 --- a/library/cpp/charset/ci_string.h +++ b/library/cpp/charset/ci_string.h @@ -51,7 +51,7 @@ public: { } - explicit TCiString(const TStringBuf& s) + explicit TCiString(const TStringBuf& s) : TString(s) { } @@ -60,17 +60,17 @@ public: static int compare(const TCiString& s1, const TCiString& s2, const CodePage& cp = csYandex); static int compare(const char* p, const TCiString& s2, const CodePage& cp = csYandex); static int compare(const TCiString& s1, const char* p, const CodePage& cp = csYandex); - static int compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp = csYandex); + static int compare(const TStringBuf& p1, const TStringBuf& p2, const CodePage& cp = csYandex); // TODO: implement properly in TString via enum ECaseSensitivity - static bool is_prefix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp = csYandex); - static bool is_suffix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp = csYandex); + static bool is_prefix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp = csYandex); + static bool is_suffix(const TStringBuf& what, const TStringBuf& of, const CodePage& cp = csYandex); - bool StartsWith(const TStringBuf& s, const CodePage& cp = csYandex) const { + bool StartsWith(const TStringBuf& s, const CodePage& cp = csYandex) const { return is_prefix(s, *this, cp); } - bool EndsWith(const TStringBuf& s, const CodePage& cp = csYandex) const { + bool EndsWith(const TStringBuf& s, const CodePage& cp = csYandex) const { return is_suffix(s, *this, cp); } @@ -217,8 +217,8 @@ struct ci_hash { inline size_t operator()(const char* s) const { return TCiString::hashVal(s, strlen(s)); } - inline size_t operator()(const TStringBuf& s) const { - return TCiString::hashVal(s.data(), s.size()); + inline size_t operator()(const TStringBuf& s) const { + return TCiString::hashVal(s.data(), s.size()); } }; @@ -240,8 +240,8 @@ struct TCIHash { template <> struct TCIHash<const char*> { - inline size_t operator()(const TStringBuf& s) const { - return TCiString::hashVal(s.data(), s.size()); + inline size_t operator()(const TStringBuf& s) const { + return TCiString::hashVal(s.data(), s.size()); } }; @@ -270,8 +270,8 @@ struct ci_equal_to { return csYandex.stricmp(x, y) == 0; } // this implementation is not suitable for strings with zero characters inside, sorry - bool operator()(const TStringBuf& x, const TStringBuf& y) const { - return x.size() == y.size() && csYandex.strnicmp(x.data(), y.data(), y.size()) == 0; + bool operator()(const TStringBuf& x, const TStringBuf& y) const { + return x.size() == y.size() && csYandex.strnicmp(x.data(), y.data(), y.size()) == 0; } }; diff --git a/library/cpp/deprecated/accessors/memory_traits.h b/library/cpp/deprecated/accessors/memory_traits.h index ef4012f6d6..aa837705d3 100644 --- a/library/cpp/deprecated/accessors/memory_traits.h +++ b/library/cpp/deprecated/accessors/memory_traits.h @@ -147,7 +147,7 @@ struct TMemoryTraits<TArrayRef<T>>: public TElementDependentMemoryTraits<T> { }; template <typename TCharType, typename TCharTraits> -struct TMemoryTraits<TBasicStringBuf<TCharType, TCharTraits>>: public TElementDependentMemoryTraits<TCharType> { +struct TMemoryTraits<TBasicStringBuf<TCharType, TCharTraits>>: public TElementDependentMemoryTraits<TCharType> { enum { OwnsMemory = false }; diff --git a/library/cpp/getopt/small/completer_command.cpp b/library/cpp/getopt/small/completer_command.cpp index d502728750..5e593eec7e 100644 --- a/library/cpp/getopt/small/completer_command.cpp +++ b/library/cpp/getopt/small/completer_command.cpp @@ -104,7 +104,7 @@ namespace NLastGetopt { } else if (shell == "zsh") { TZshCompletionGenerator(opts).Generate(command, Cout); } else { - Cerr << "Unknown shell name " << TString{shell}.Quote() << Endl; + Cerr << "Unknown shell name " << TString{shell}.Quote() << Endl; exit(1); } exit(0); diff --git a/library/cpp/http/io/headers.cpp b/library/cpp/http/io/headers.cpp index e23a8257fc..4ec27a29e8 100644 --- a/library/cpp/http/io/headers.cpp +++ b/library/cpp/http/io/headers.cpp @@ -16,7 +16,7 @@ THttpInputHeader::THttpInputHeader(const TStringBuf header) { size_t pos = header.find(':'); if (pos == TString::npos) { - ythrow THttpParseException() << "can not parse http header(" << TString{header}.Quote() << ")"; + ythrow THttpParseException() << "can not parse http header(" << TString{header}.Quote() << ")"; } Name_ = TString(header.cbegin(), header.cbegin() + pos); diff --git a/library/cpp/http/io/headers_ut.cpp b/library/cpp/http/io/headers_ut.cpp index b068de8fe4..1d23ef8fdc 100644 --- a/library/cpp/http/io/headers_ut.cpp +++ b/library/cpp/http/io/headers_ut.cpp @@ -20,7 +20,7 @@ namespace { } public: - void Add(TStringBuf name, TStringBuf value) { + void Add(TStringBuf name, TStringBuf value) { Impl.emplace(TString(name), TString(value)); } @@ -53,7 +53,7 @@ class THttpHeadersTest: public TTestBase { UNIT_TEST_SUITE_END(); private: - typedef void (*TAddHeaderFunction)(THttpHeaders&, TStringBuf name, TStringBuf value); + typedef void (*TAddHeaderFunction)(THttpHeaders&, TStringBuf name, TStringBuf value); typedef void (*TAddOrReplaceHeaderFunction)(THttpHeaders&, TStringBuf name, TStringBuf value); public: @@ -65,11 +65,11 @@ public: void TestFindHeader(); private: - static void AddHeaderImpl1Arg(THttpHeaders& headers, TStringBuf name, TStringBuf value) { + static void AddHeaderImpl1Arg(THttpHeaders& headers, TStringBuf name, TStringBuf value) { headers.AddHeader(THttpInputHeader(TString(name), TString(value))); } - static void AddHeaderImpl2Args(THttpHeaders& headers, TStringBuf name, TStringBuf value) { + static void AddHeaderImpl2Args(THttpHeaders& headers, TStringBuf name, TStringBuf value) { headers.AddHeader(TString(name), TString(value)); } @@ -156,7 +156,7 @@ void THttpHeadersTest::TestAddHeaderTemplateness() { h1.AddHeader("h1", "v1"); h1.AddHeader("h2", TString("v2")); h1.AddHeader("h3", TStringBuf("v3")); - h1.AddHeader("h4", TStringBuf("v4")); + h1.AddHeader("h4", TStringBuf("v4")); THeadersExistence h2; h2.Add("h1", "v1"); diff --git a/library/cpp/json/easy_parse/json_easy_parser.cpp b/library/cpp/json/easy_parse/json_easy_parser.cpp index f88894e8ff..3c781f544b 100644 --- a/library/cpp/json/easy_parse/json_easy_parser.cpp +++ b/library/cpp/json/easy_parse/json_easy_parser.cpp @@ -160,7 +160,7 @@ namespace NJson { Pop(); UpdateRule(); } - Stack.push_back(TPathElem(TString{key})); + Stack.push_back(TPathElem(TString{key})); if (CurrentFieldIdx >= 0) HasFormatError = true; else diff --git a/library/cpp/monlib/encode/protobuf/protobuf_encoder.cpp b/library/cpp/monlib/encode/protobuf/protobuf_encoder.cpp index 8b0ac1f4ca..2d11b9d5ba 100644 --- a/library/cpp/monlib/encode/protobuf/protobuf_encoder.cpp +++ b/library/cpp/monlib/encode/protobuf/protobuf_encoder.cpp @@ -93,8 +93,8 @@ namespace NMonitoring { NProto::TLabel* label = (Sample_ == nullptr) ? Samples_->AddCommonLabels() : Sample_->AddLabels(); - label->SetName(TString{name}); - label->SetValue(TString{value}); + label->SetName(TString{name}); + label->SetValue(TString{value}); } void OnDouble(TInstant time, double value) override { @@ -181,8 +181,8 @@ namespace NMonitoring { ? Samples_->AddCommonLabels() : Sample_->AddLabels(); - label->SetName(TString{name}); - label->SetValue(TString{value}); + label->SetName(TString{name}); + label->SetValue(TString{value}); } void OnDouble(TInstant time, double value) override { diff --git a/library/cpp/regex/pire/regexp.h b/library/cpp/regex/pire/regexp.h index 58e782f721..94bba4064b 100644 --- a/library/cpp/regex/pire/regexp.h +++ b/library/cpp/regex/pire/regexp.h @@ -47,17 +47,17 @@ namespace NRegExp { bool AndNotSupport = false; }; - static inline NPire::TFsm Parse(const TStringBuf& regexp, + static inline NPire::TFsm Parse(const TStringBuf& regexp, const TOptions& opts, const bool needDetermine = true) { NPire::TLexer lexer; if (opts.Charset == CODES_UNKNOWN) { - lexer.Assign(regexp.data(), regexp.data() + regexp.size()); + lexer.Assign(regexp.data(), regexp.data() + regexp.size()); } else { - TVector<wchar32> ucs4(regexp.size() + 1); + TVector<wchar32> ucs4(regexp.size() + 1); size_t inRead = 0; size_t outWritten = 0; - int recodeRes = RecodeToUnicode(opts.Charset, regexp.data(), ucs4.data(), - regexp.size(), regexp.size(), inRead, outWritten); + int recodeRes = RecodeToUnicode(opts.Charset, regexp.data(), ucs4.data(), + regexp.size(), regexp.size(), inRead, outWritten); Y_ASSERT(recodeRes == RECODE_OK); Y_ASSERT(outWritten < ucs4.size()); ucs4[outWritten] = 0; @@ -112,7 +112,7 @@ namespace NRegExp { typedef TScannerType TScanner; public: - inline explicit TFsmParser(const TStringBuf& regexp, + inline explicit TFsmParser(const TStringBuf& regexp, const TOptions& opts = TOptions(), bool needDetermine = true) : Scanner(Parse(regexp, opts, needDetermine).template Compile<TScanner>()) { @@ -139,7 +139,7 @@ namespace NRegExp { class TFsm: public TFsmParser<NPire::TNonrelocScanner> { public: - inline explicit TFsm(const TStringBuf& regexp, + inline explicit TFsm(const TStringBuf& regexp, const TOptions& opts = TOptions()) : TFsmParser<TScanner>(regexp, opts) { @@ -165,7 +165,7 @@ namespace NRegExp { } struct TCapturingFsm : TFsmParser<NPire::TCapturingScanner> { - inline explicit TCapturingFsm(const TStringBuf& regexp, + inline explicit TCapturingFsm(const TStringBuf& regexp, TOptions opts = TOptions()) : TFsmParser<TScanner>(regexp, opts.SetSurround(true).CapturePos ? opts : opts.SetCapture(1)) { @@ -178,7 +178,7 @@ namespace NRegExp { }; struct TSlowCapturingFsm : TFsmParser<NPire::TSlowCapturingScanner> { - inline explicit TSlowCapturingFsm(const TStringBuf& regexp, + inline explicit TSlowCapturingFsm(const TStringBuf& regexp, TOptions opts = TOptions()) : TFsmParser<TScanner>(regexp, opts.SetSurround(true).CapturePos ? opts : opts.SetCapture(1), false) { @@ -241,8 +241,8 @@ namespace NRegExp { return *this; } - inline TMatcher& Match(const TStringBuf& s, bool addBegin = false, bool addEnd = false) noexcept { - return Match(s.data(), s.size(), addBegin, addEnd); + inline TMatcher& Match(const TStringBuf& s, bool addBegin = false, bool addEnd = false) noexcept { + return Match(s.data(), s.size(), addBegin, addEnd); } inline const char* Find(const char* b, const char* e) noexcept { @@ -273,8 +273,8 @@ namespace NRegExp { return *this; } - inline TSearcher& Search(const TStringBuf& s) noexcept { - return Search(s.data(), s.size()); + inline TSearcher& Search(const TStringBuf& s) noexcept { + return Search(s.data(), s.size()); } inline TStringBuf GetCaptured() const noexcept { @@ -306,8 +306,8 @@ namespace NRegExp { return GetAns(); } - inline TSlowSearcher& Search(const TStringBuf& s) noexcept { - return Search(s.data(), s.size()); + inline TSlowSearcher& Search(const TStringBuf& s) noexcept { + return Search(s.data(), s.size()); } inline TStringBuf GetCaptured() const noexcept { diff --git a/library/cpp/resource/registry.cpp b/library/cpp/resource/registry.cpp index bdf770abe0..66001c4769 100644 --- a/library/cpp/resource/registry.cpp +++ b/library/cpp/resource/registry.cpp @@ -31,14 +31,14 @@ namespace { Y_VERIFY(false, "Redefinition of key %s:\n" " old value: %s,\n" " new value: %s.", - TString{key}.Quote().c_str(), + TString{key}.Quote().c_str(), Decompress(value).Quote().c_str(), Decompress(data).Quote().c_str()); } else { Y_VERIFY(false, "Redefinition of key %s," " old size: %zu," " new size: %zu.", - TString{key}.Quote().c_str(), vsize, dsize); + TString{key}.Quote().c_str(), vsize, dsize); } } } else { diff --git a/library/cpp/string_utils/base64/base64.h b/library/cpp/string_utils/base64/base64.h index 70917c89d1..f778a6425a 100644 --- a/library/cpp/string_utils/base64/base64.h +++ b/library/cpp/string_utils/base64/base64.h @@ -2,7 +2,7 @@ #include <util/system/defaults.h> #include <util/generic/strbuf.h> -#include <util/generic/string.h> +#include <util/generic/string.h> /* @return Size of the buffer required to decode Base64 encoded data of size `len`. */ diff --git a/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp b/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp index 9c8bbbdfdd..768555ea3a 100644 --- a/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp +++ b/library/cpp/string_utils/relaxed_escaper/relaxed_escaper_ut.cpp @@ -2,8 +2,8 @@ #include <library/cpp/testing/unittest/registar.h> -#define RESC_FIXED_STR(s) TStringBuf(s, sizeof(s) - 1) -static const TStringBuf CommonTestData[] = { +#define RESC_FIXED_STR(s) TStringBuf(s, sizeof(s) - 1) +static const TStringBuf CommonTestData[] = { // Should be valid UTF-8. RESC_FIXED_STR("http://ya.ru/"), RESC_FIXED_STR("http://ya.ru/"), RESC_FIXED_STR("http://ya.ru/\\x17\\n"), RESC_FIXED_STR("http://ya.ru/\x17\n"), @@ -29,8 +29,8 @@ Y_UNIT_TEST_SUITE(TRelaxedEscaperTest) { Y_UNIT_TEST(TestEscaper) { using namespace NEscJ; for (size_t i = 0; i < Y_ARRAY_SIZE(CommonTestData); i += 2) { - TString expected(CommonTestData[i].data(), CommonTestData[i].size()); - TString source(CommonTestData[i + 1].data(), CommonTestData[i + 1].size()); + TString expected(CommonTestData[i].data(), CommonTestData[i].size()); + TString source(CommonTestData[i + 1].data(), CommonTestData[i + 1].size()); TString actual(EscapeJ<false>(source)); TString actual2(UnescapeC(expected)); diff --git a/library/cpp/string_utils/ztstrbuf/ztstrbuf.h b/library/cpp/string_utils/ztstrbuf/ztstrbuf.h index eb88d28b3e..5fab768d8c 100644 --- a/library/cpp/string_utils/ztstrbuf/ztstrbuf.h +++ b/library/cpp/string_utils/ztstrbuf/ztstrbuf.h @@ -1,7 +1,7 @@ #pragma once #include <util/generic/strbuf.h> -#include <util/generic/string.h> +#include <util/generic/string.h> /* * Zero-terminated string view. diff --git a/library/cpp/testing/common/env.cpp b/library/cpp/testing/common/env.cpp index 9661846e82..fa3a47fe16 100644 --- a/library/cpp/testing/common/env.cpp +++ b/library/cpp/testing/common/env.cpp @@ -5,15 +5,15 @@ #include <util/folder/dirut.h> #include <util/folder/path.h> #include <util/generic/singleton.h> -#include <util/stream/file.h> +#include <util/stream/file.h> #include <util/stream/fwd.h> #include <util/system/env.h> #include <util/system/file.h> #include <util/system/file_lock.h> #include <util/system/guard.h> -#include <library/cpp/json/json_reader.h> -#include <library/cpp/json/json_value.h> +#include <library/cpp/json/json_reader.h> +#include <library/cpp/json/json_value.h> #include <library/cpp/json/json_writer.h> TString ArcadiaSourceRoot() { @@ -41,12 +41,12 @@ TString BinaryPath(TStringBuf path) { } TString GetArcadiaTestsData() { - TString atdRoot = NPrivate::GetTestEnv().ArcadiaTestsDataDir; - if (atdRoot) { - return atdRoot; + TString atdRoot = NPrivate::GetTestEnv().ArcadiaTestsDataDir; + if (atdRoot) { + return atdRoot; } - TString path = NPrivate::GetCwd(); + TString path = NPrivate::GetCwd(); const char pathsep = GetDirectorySeparator(); while (!path.empty()) { TString dataDir = path + "/arcadia_tests_data"; @@ -65,12 +65,12 @@ TString GetArcadiaTestsData() { } TString GetWorkPath() { - TString workPath = NPrivate::GetTestEnv().WorkPath; - if (workPath) { - return workPath; + TString workPath = NPrivate::GetTestEnv().WorkPath; + if (workPath) { + return workPath; } - - return NPrivate::GetCwd(); + + return NPrivate::GetCwd(); } TFsPath GetOutputPath() { @@ -78,7 +78,7 @@ TFsPath GetOutputPath() { } const TString& GetRamDrivePath() { - return NPrivate::GetTestEnv().RamDrivePath; + return NPrivate::GetTestEnv().RamDrivePath; } const TString& GetYtHddPath() { @@ -86,7 +86,7 @@ const TString& GetYtHddPath() { } const TString& GetOutputRamDrivePath() { - return NPrivate::GetTestEnv().TestOutputRamDrivePath; + return NPrivate::GetTestEnv().TestOutputRamDrivePath; } const TString& GdbPath() { @@ -144,68 +144,68 @@ void StopProcessCoreWatching(int pid) { } bool FromYaTest() { - return NPrivate::GetTestEnv().IsRunningFromTest; + return NPrivate::GetTestEnv().IsRunningFromTest; } - -namespace NPrivate { - TTestEnv::TTestEnv() { - ReInitialize(); - } - - void TTestEnv::ReInitialize() { - IsRunningFromTest = false; - ArcadiaTestsDataDir = ""; - SourceRoot = ""; - BuildRoot = ""; - WorkPath = ""; - RamDrivePath = ""; + +namespace NPrivate { + TTestEnv::TTestEnv() { + ReInitialize(); + } + + void TTestEnv::ReInitialize() { + IsRunningFromTest = false; + ArcadiaTestsDataDir = ""; + SourceRoot = ""; + BuildRoot = ""; + WorkPath = ""; + RamDrivePath = ""; YtHddPath = ""; - TestOutputRamDrivePath = ""; + TestOutputRamDrivePath = ""; GdbPath = ""; CoreSearchFile = ""; TestParameters.clear(); - - const TString contextFilename = GetEnv("YA_TEST_CONTEXT_FILE"); - if (contextFilename) { - NJson::TJsonValue context; - NJson::ReadJsonTree(TFileInput(contextFilename).ReadAll(), &context); - - NJson::TJsonValue* value; - - value = context.GetValueByPath("runtime.source_root"); - if (value) { - SourceRoot = value->GetStringSafe(""); - } - - value = context.GetValueByPath("runtime.build_root"); - if (value) { - BuildRoot = value->GetStringSafe(""); - } - - value = context.GetValueByPath("runtime.atd_root"); - if (value) { - ArcadiaTestsDataDir = value->GetStringSafe(""); - } - - value = context.GetValueByPath("runtime.work_path"); - if (value) { - WorkPath = value->GetStringSafe(""); - } - - value = context.GetValueByPath("runtime.ram_drive_path"); - if (value) { - RamDrivePath = value->GetStringSafe(""); - } - + + const TString contextFilename = GetEnv("YA_TEST_CONTEXT_FILE"); + if (contextFilename) { + NJson::TJsonValue context; + NJson::ReadJsonTree(TFileInput(contextFilename).ReadAll(), &context); + + NJson::TJsonValue* value; + + value = context.GetValueByPath("runtime.source_root"); + if (value) { + SourceRoot = value->GetStringSafe(""); + } + + value = context.GetValueByPath("runtime.build_root"); + if (value) { + BuildRoot = value->GetStringSafe(""); + } + + value = context.GetValueByPath("runtime.atd_root"); + if (value) { + ArcadiaTestsDataDir = value->GetStringSafe(""); + } + + value = context.GetValueByPath("runtime.work_path"); + if (value) { + WorkPath = value->GetStringSafe(""); + } + + value = context.GetValueByPath("runtime.ram_drive_path"); + if (value) { + RamDrivePath = value->GetStringSafe(""); + } + value = context.GetValueByPath("runtime.yt_hdd_path"); if (value) { YtHddPath = value->GetStringSafe(""); } - value = context.GetValueByPath("runtime.test_output_ram_drive_path"); - if (value) { - TestOutputRamDrivePath = value->GetStringSafe(""); - } + value = context.GetValueByPath("runtime.test_output_ram_drive_path"); + if (value) { + TestOutputRamDrivePath = value->GetStringSafe(""); + } value = context.GetValueByPath("runtime.gdb_bin"); if (value) { @@ -223,53 +223,53 @@ namespace NPrivate { if (value) { CoreSearchFile = value->GetStringSafe(""); } - } - + } + if (!YtHddPath) { YtHddPath = GetEnv("HDD_PATH"); } - if (!SourceRoot) { - SourceRoot = GetEnv("ARCADIA_SOURCE_ROOT"); - } - - if (!BuildRoot) { - BuildRoot = GetEnv("ARCADIA_BUILD_ROOT"); - } - - if (!ArcadiaTestsDataDir) { - ArcadiaTestsDataDir = GetEnv("ARCADIA_TESTS_DATA_DIR"); - } - - if (!WorkPath) { - WorkPath = GetEnv("TEST_WORK_PATH"); - } - - if (!RamDrivePath) { - RamDrivePath = GetEnv("YA_TEST_RAM_DRIVE_PATH"); - } - - if (!TestOutputRamDrivePath) { - TestOutputRamDrivePath = GetEnv("YA_TEST_OUTPUT_RAM_DRIVE_PATH"); - } - - const TString fromEnv = GetEnv("YA_TEST_RUNNER"); - IsRunningFromTest = (fromEnv == "1"); - } - + if (!SourceRoot) { + SourceRoot = GetEnv("ARCADIA_SOURCE_ROOT"); + } + + if (!BuildRoot) { + BuildRoot = GetEnv("ARCADIA_BUILD_ROOT"); + } + + if (!ArcadiaTestsDataDir) { + ArcadiaTestsDataDir = GetEnv("ARCADIA_TESTS_DATA_DIR"); + } + + if (!WorkPath) { + WorkPath = GetEnv("TEST_WORK_PATH"); + } + + if (!RamDrivePath) { + RamDrivePath = GetEnv("YA_TEST_RAM_DRIVE_PATH"); + } + + if (!TestOutputRamDrivePath) { + TestOutputRamDrivePath = GetEnv("YA_TEST_OUTPUT_RAM_DRIVE_PATH"); + } + + const TString fromEnv = GetEnv("YA_TEST_RUNNER"); + IsRunningFromTest = (fromEnv == "1"); + } + void TTestEnv::AddTestParam(TStringBuf name, TStringBuf value) { TestParameters[TString{name}] = value; } - TString GetCwd() { - try { - return NFs::CurrentWorkingDirectory(); - } catch (...) { - return {}; - } - } - - const TTestEnv& GetTestEnv() { - return *Singleton<TTestEnv>(); - } -} + TString GetCwd() { + try { + return NFs::CurrentWorkingDirectory(); + } catch (...) { + return {}; + } + } + + const TTestEnv& GetTestEnv() { + return *Singleton<TTestEnv>(); + } +} diff --git a/library/cpp/testing/common/env.h b/library/cpp/testing/common/env.h index aa247afb9a..7b89aa1bed 100644 --- a/library/cpp/testing/common/env.h +++ b/library/cpp/testing/common/env.h @@ -55,30 +55,30 @@ void WatchProcessCore(int pid, const TFsPath& binaryPath, const TFsPath& cwd = T void StopProcessCoreWatching(int pid); #define SRC_(path) ArcadiaFromCurrentLocation(__SOURCE_FILE__, path) - -namespace NPrivate { - class TTestEnv { - public: - TTestEnv(); - - void ReInitialize(); - + +namespace NPrivate { + class TTestEnv { + public: + TTestEnv(); + + void ReInitialize(); + void AddTestParam(TStringBuf name, TStringBuf value); - bool IsRunningFromTest; - TString ArcadiaTestsDataDir; - TString SourceRoot; - TString BuildRoot; - TString WorkPath; - TString RamDrivePath; + bool IsRunningFromTest; + TString ArcadiaTestsDataDir; + TString SourceRoot; + TString BuildRoot; + TString WorkPath; + TString RamDrivePath; TString YtHddPath; - TString TestOutputRamDrivePath; + TString TestOutputRamDrivePath; TString GdbPath; TString CoreSearchFile; std::unordered_map<TString, TString> TestParameters; - }; - - TString GetCwd(); - - const TTestEnv& GetTestEnv(); -} + }; + + TString GetCwd(); + + const TTestEnv& GetTestEnv(); +} diff --git a/library/cpp/testing/common/ut/env_ut.cpp b/library/cpp/testing/common/ut/env_ut.cpp index 64a79bb411..2aed1e4a25 100644 --- a/library/cpp/testing/common/ut/env_ut.cpp +++ b/library/cpp/testing/common/ut/env_ut.cpp @@ -10,52 +10,52 @@ TEST(Runtime, ArcadiaSourceRoot) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename { auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("ARCADIA_SOURCE_ROOT", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, ArcadiaSourceRoot()); } { NTesting::TScopedEnvironment guard("ARCADIA_SOURCE_ROOT", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_FALSE(ArcadiaSourceRoot().empty()); } } TEST(Runtime, BuildRoot) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename { auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("ARCADIA_BUILD_ROOT", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, BuildRoot()); } { NTesting::TScopedEnvironment guard("ARCADIA_BUILD_ROOT", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_FALSE(BuildRoot().empty()); } } TEST(Runtime, BinaryPath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_TRUE(TFsPath(BinaryPath("library/cpp/testing/common/ut")).Exists()); } TEST(Runtime, GetArcadiaTestsData) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename { auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("ARCADIA_TESTS_DATA_DIR", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetArcadiaTestsData()); } { NTesting::TScopedEnvironment guard("ARCADIA_TESTS_DATA_DIR", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); auto path = GetArcadiaTestsData(); // it is not error if path is empty const bool ok = (path.empty() || GetBaseName(path) == "arcadia_tests_data"); @@ -64,39 +64,39 @@ TEST(Runtime, GetArcadiaTestsData) { } TEST(Runtime, GetWorkPath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename { auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("TEST_WORK_PATH", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetWorkPath()); } { NTesting::TScopedEnvironment guard("TEST_WORK_PATH", ""); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_TRUE(!GetWorkPath().empty()); } } TEST(Runtime, GetOutputPath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(GetOutputPath().Basename(), "testing_out_stuff"); } TEST(Runtime, GetRamDrivePath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("YA_TEST_RAM_DRIVE_PATH", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetRamDrivePath()); } TEST(Runtime, GetOutputRamDrivePath) { - NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename + NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", ""); // remove context filename auto tmpDir = ::GetSystemTempDir(); NTesting::TScopedEnvironment guard("YA_TEST_OUTPUT_RAM_DRIVE_PATH", tmpDir); - Singleton<NPrivate::TTestEnv>()->ReInitialize(); + Singleton<NPrivate::TTestEnv>()->ReInitialize(); EXPECT_EQ(tmpDir, GetOutputRamDrivePath()); } diff --git a/library/cpp/testing/common/ya.make b/library/cpp/testing/common/ya.make index ac83cc98ce..2f4b0ce26e 100644 --- a/library/cpp/testing/common/ya.make +++ b/library/cpp/testing/common/ya.make @@ -14,10 +14,10 @@ SRCS( scope.cpp ) -PEERDIR( - library/cpp/json -) - +PEERDIR( + library/cpp/json +) + END() RECURSE_FOR_TESTS(ut) diff --git a/library/cpp/testing/unittest/checks.cpp b/library/cpp/testing/unittest/checks.cpp index c3b4b3bf34..c5712ae9d2 100644 --- a/library/cpp/testing/unittest/checks.cpp +++ b/library/cpp/testing/unittest/checks.cpp @@ -1,4 +1,4 @@ -#include <util/generic/string.h> +#include <util/generic/string.h> #include <util/string/type.h> bool CheckExceptionMessage(const char* msg, TString& err) { diff --git a/library/cpp/xml/document/node-attr.h b/library/cpp/xml/document/node-attr.h index 2dce81b158..6e74403943 100644 --- a/library/cpp/xml/document/node-attr.h +++ b/library/cpp/xml/document/node-attr.h @@ -22,7 +22,7 @@ namespace NXml { try { res = FromString<T>(CAST2CHAR(value.Get())); } catch (TFromStringException&) { - THROW(XmlException, "Failed to convert string " << TString{TStringBuf(CAST2CHAR(value.Get())).substr(0, 50)}.Quote() << " from '" << errContext << "' to requested type"); + THROW(XmlException, "Failed to convert string " << TString{TStringBuf(CAST2CHAR(value.Get())).substr(0, 50)}.Quote() << " from '" << errContext << "' to requested type"); } } diff --git a/library/python/pytest/plugins/collection.py b/library/python/pytest/plugins/collection.py index 8292d750a8..e36f47a78f 100644 --- a/library/python/pytest/plugins/collection.py +++ b/library/python/pytest/plugins/collection.py @@ -1,6 +1,6 @@ import os import sys -from six import reraise +from six import reraise import py @@ -61,19 +61,19 @@ class DoctestModule(LoadedModule): optionflags = _pytest.doctest.get_optionflags(self) runner = doctest.DebugRunner(verbose=0, optionflags=optionflags) - try: + try: for test in finder.find(module, self.name[:-len('.py')]): - if test.examples: # skip empty doctests + if test.examples: # skip empty doctests yield getattr(_pytest.doctest.DoctestItem, 'from_parent', _pytest.doctest.DoctestItem)( name=test.name, parent=self, runner=runner, dtest=test) except Exception: - import logging - logging.exception('DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make') - etype, exc, tb = sys.exc_info() - msg = 'DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make' + import logging + logging.exception('DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make') + etype, exc, tb = sys.exc_info() + msg = 'DoctestModule failed, probably you can add NO_DOCTESTS() macro to ya.make' reraise(etype, type(exc)('{}\n{}'.format(exc, msg)), tb) @@ -116,13 +116,13 @@ class CollectionPlugin(object): if not pytest_ignore_collect(module, session, filenames_filter, accept_filename_predicate): yield module - if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no': + if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no': module = DoctestModule.from_parent(name=test_module, parent=session) - if not pytest_ignore_collect(module, session, filenames_filter, accept_filename_predicate): - yield module + if not pytest_ignore_collect(module, session, filenames_filter, accept_filename_predicate): + yield module - if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no': - for doctest_module in self._doctest_modules: + if os.environ.get('YA_PYTEST_DISABLE_DOCTEST', 'no') == 'no': + for doctest_module in self._doctest_modules: yield DoctestModule.from_parent(name=doctest_module, parent=session, namespace=False) session.collect = collect diff --git a/util/generic/strbase.h b/util/generic/strbase.h index b3ff909e1b..ab39fc7537 100644 --- a/util/generic/strbase.h +++ b/util/generic/strbase.h @@ -36,9 +36,9 @@ namespace NStringPrivate { template <typename TDerived, typename TCharType, typename TTraitsType = std::char_traits<TCharType>> class TStringBase { - using TStringView = std::basic_string_view<TCharType>; + using TStringView = std::basic_string_view<TCharType>; using TStringViewWithTraits = std::basic_string_view<TCharType, TTraitsType>; - + public: using TChar = TCharType; using TTraits = TTraitsType; @@ -210,12 +210,12 @@ public: // style-guide compliant methods return 0 == Len(); } -private: - static inline TStringView LegacySubString(const TStringView view, size_t p, size_t n) noexcept { - p = Min(p, view.length()); - return view.substr(p, n); - } - +private: + static inline TStringView LegacySubString(const TStringView view, size_t p, size_t n) noexcept { + p = Min(p, view.length()); + return view.substr(p, n); + } + public: // ~~~ Comparison ~~~ : FAMILY0(int, compare) static int compare(const TSelf& s1, const TSelf& s2) noexcept { @@ -232,7 +232,7 @@ public: return s1.AsStringView().compare(p ? p : &null); } - static int compare(const TStringView s1, const TStringView s2) noexcept { + static int compare(const TStringView s1, const TStringView s2) noexcept { return TStringViewWithTraits(s1.data(), s1.size()).compare(TStringViewWithTraits(s2.data(), s2.size())); } @@ -241,20 +241,20 @@ public: return compare(*this, t); } - inline int compare(size_t p, size_t n, const TStringView t) const noexcept { - return compare(LegacySubString(*this, p, n), t); + inline int compare(size_t p, size_t n, const TStringView t) const noexcept { + return compare(LegacySubString(*this, p, n), t); } - inline int compare(size_t p, size_t n, const TStringView t, size_t p1, size_t n1) const noexcept { - return compare(LegacySubString(*this, p, n), LegacySubString(t, p1, n1)); + inline int compare(size_t p, size_t n, const TStringView t, size_t p1, size_t n1) const noexcept { + return compare(LegacySubString(*this, p, n), LegacySubString(t, p1, n1)); } - inline int compare(size_t p, size_t n, const TStringView t, size_t n1) const noexcept { - return compare(LegacySubString(*this, p, n), LegacySubString(t, 0, n1)); + inline int compare(size_t p, size_t n, const TStringView t, size_t n1) const noexcept { + return compare(LegacySubString(*this, p, n), LegacySubString(t, 0, n1)); } inline int compare(const TCharType* p, size_t len) const noexcept { - return compare(*this, TStringView(p, len)); + return compare(*this, TStringView(p, len)); } static bool equal(const TSelf& s1, const TSelf& s2) noexcept { @@ -273,7 +273,7 @@ public: return equal(s2, p); } - static bool equal(const TStringView s1, const TStringView s2) noexcept { + static bool equal(const TStringView s1, const TStringView s2) noexcept { return TStringViewWithTraits{s1.data(), s1.size()} == TStringViewWithTraits{s2.data(), s2.size()}; } @@ -282,16 +282,16 @@ public: return equal(*this, t); } - inline bool equal(size_t p, size_t n, const TStringView t) const noexcept { - return equal(LegacySubString(*this, p, n), t); + inline bool equal(size_t p, size_t n, const TStringView t) const noexcept { + return equal(LegacySubString(*this, p, n), t); } - inline bool equal(size_t p, size_t n, const TStringView t, size_t p1, size_t n1) const noexcept { - return equal(LegacySubString(*this, p, n), LegacySubString(t, p1, n1)); + inline bool equal(size_t p, size_t n, const TStringView t, size_t p1, size_t n1) const noexcept { + return equal(LegacySubString(*this, p, n), LegacySubString(t, p1, n1)); } - inline bool equal(size_t p, size_t n, const TStringView t, size_t n1) const noexcept { - return equal(LegacySubString(*this, p, n), LegacySubString(t, 0, n1)); + inline bool equal(size_t p, size_t n, const TStringView t, size_t n1) const noexcept { + return equal(LegacySubString(*this, p, n), LegacySubString(t, 0, n1)); } static inline bool StartsWith(const TCharType* what, size_t whatLen, const TCharType* with, size_t withLen) noexcept { @@ -306,8 +306,8 @@ public: return StartsWith(Ptr(), Len(), s, n); } - inline bool StartsWith(const TStringView s) const noexcept { - return StartsWith(s.data(), s.length()); + inline bool StartsWith(const TStringView s) const noexcept { + return StartsWith(s.data(), s.length()); } inline bool StartsWith(TCharType ch) const noexcept { @@ -318,8 +318,8 @@ public: return EndsWith(Ptr(), Len(), s, n); } - inline bool EndsWith(const TStringView s) const noexcept { - return EndsWith(s.data(), s.length()); + inline bool EndsWith(const TStringView s) const noexcept { + return EndsWith(s.data(), s.length()); } inline bool EndsWith(TCharType ch) const noexcept { @@ -448,7 +448,7 @@ public: /** * @return Position of the substring inside this string, or `npos` if not found. */ - inline size_t find(const TStringView s, size_t pos = 0) const noexcept { + inline size_t find(const TStringView s, size_t pos = 0) const noexcept { return find(s.data(), pos, s.size()); } @@ -471,7 +471,7 @@ public: return AsStringView().rfind(c, pos - 1); } - inline size_t rfind(const TStringView str, size_t pos = npos) const { + inline size_t rfind(const TStringView str, size_t pos = npos) const { return AsStringView().rfind(str.data(), pos, str.size()); } @@ -479,8 +479,8 @@ public: /** * @returns Whether this string contains the provided substring. */ - inline bool Contains(const TStringView s, size_t pos = 0) const noexcept { - return !s.length() || find(s, pos) != npos; + inline bool Contains(const TStringView s, size_t pos = 0) const noexcept { + return !s.length() || find(s, pos) != npos; } inline bool Contains(TChar c, size_t pos = 0) const noexcept { @@ -500,11 +500,11 @@ public: return find(c, pos); } - inline size_t find_first_of(const TStringView set) const noexcept { + inline size_t find_first_of(const TStringView set) const noexcept { return find_first_of(set, 0); } - inline size_t find_first_of(const TStringView set, size_t pos) const noexcept { + inline size_t find_first_of(const TStringView set, size_t pos) const noexcept { return AsStringView().find_first_of(set.data(), pos, set.size()); } @@ -513,14 +513,14 @@ public: } inline size_t find_first_not_of(TCharType c, size_t pos) const noexcept { - return find_first_not_of(TStringView(&c, 1), pos); + return find_first_not_of(TStringView(&c, 1), pos); } - inline size_t find_first_not_of(const TStringView set) const noexcept { + inline size_t find_first_not_of(const TStringView set) const noexcept { return find_first_not_of(set, 0); } - inline size_t find_first_not_of(const TStringView set, size_t pos) const noexcept { + inline size_t find_first_not_of(const TStringView set, size_t pos) const noexcept { return AsStringView().find_first_not_of(set.data(), pos, set.size()); } @@ -528,8 +528,8 @@ public: return find_last_of(&c, pos, 1); } - inline size_t find_last_of(const TStringView set, size_t pos = npos) const noexcept { - return find_last_of(set.data(), pos, set.length()); + inline size_t find_last_of(const TStringView set, size_t pos = npos) const noexcept { + return find_last_of(set.data(), pos, set.length()); } inline size_t find_last_of(const TCharType* set, size_t pos, size_t n) const noexcept { @@ -540,8 +540,8 @@ public: return AsStringView().find_last_not_of(c, pos); } - inline size_t find_last_not_of(const TStringView set, size_t pos = npos) const noexcept { - return find_last_not_of(set.data(), pos, set.length()); + inline size_t find_last_not_of(const TStringView set, size_t pos = npos) const noexcept { + return find_last_not_of(set.data(), pos, set.length()); } inline size_t find_last_not_of(const TCharType* set, size_t pos, size_t n) const noexcept { diff --git a/util/generic/strbuf.h b/util/generic/strbuf.h index e7fb3ece47..70b9360d58 100644 --- a/util/generic/strbuf.h +++ b/util/generic/strbuf.h @@ -1,7 +1,7 @@ #pragma once #include "fwd.h" -#include "strbase.h" +#include "strbase.h" #include "utility.h" #include "typetraits.h" @@ -111,7 +111,7 @@ public: { } - constexpr inline TBasicStringBuf(const TCharType* beg, const TCharType* end) noexcept + constexpr inline TBasicStringBuf(const TCharType* beg, const TCharType* end) noexcept : TStringView(beg, end - beg) { } @@ -145,13 +145,13 @@ public: */ } - inline TBasicStringBuf(const TBasicStringBuf& src, size_t pos, size_t n) noexcept - : TBasicStringBuf(src) + inline TBasicStringBuf(const TBasicStringBuf& src, size_t pos, size_t n) noexcept + : TBasicStringBuf(src) { Skip(pos).Trunc(n); } - inline TBasicStringBuf(const TBasicStringBuf& src, size_t pos) noexcept + inline TBasicStringBuf(const TBasicStringBuf& src, size_t pos) noexcept : TBasicStringBuf(src, pos, TBase::npos) { } @@ -160,8 +160,8 @@ public: pos = Min(pos, size()); n = Min(n, size() - pos); return TBasicStringBuf(data() + pos, n); - } - + } + public: void Clear() { *this = TdSelf(); @@ -320,7 +320,7 @@ public: public: inline bool AfterPrefix(const TdSelf& prefix, TdSelf& result) const noexcept { if (this->StartsWith(prefix)) { - result = Tail(prefix.size()); + result = Tail(prefix.size()); return true; } return false; diff --git a/util/generic/string.cpp b/util/generic/string.cpp index 4a2b96ab99..3c655f1f66 100644 --- a/util/generic/string.cpp +++ b/util/generic/string.cpp @@ -40,11 +40,11 @@ bool TBasicString<char, std::char_traits<char>>::to_title(size_t pos, size_t n) template <> TUtf16String& TBasicString<wchar16, std::char_traits<wchar16>>::AppendAscii(const ::TStringBuf& s) { - ReserveAndResize(size() + s.size()); + ReserveAndResize(size() + s.size()); - auto dst = begin() + size() - s.size(); + auto dst = begin() + size() - s.size(); - for (const char* src = s.data(); dst != end(); ++dst, ++src) { + for (const char* src = s.data(); dst != end(); ++dst, ++src) { *dst = static_cast<wchar16>(*src); } @@ -55,11 +55,11 @@ template <> TUtf16String& TBasicString<wchar16, std::char_traits<wchar16>>::AppendUtf8(const ::TStringBuf& s) { size_t oldSize = size(); - ReserveAndResize(size() + s.size() * 4); + ReserveAndResize(size() + s.size() * 4); size_t written = 0; - size_t pos = UTF8ToWideImpl(s.data(), s.size(), begin() + oldSize, written); + size_t pos = UTF8ToWideImpl(s.data(), s.size(), begin() + oldSize, written); if (pos != s.size()) { - ythrow yexception() << "failed to decode UTF-8 string at pos " << pos << ::NDetail::InStringMsg(s.data(), s.size()); + ythrow yexception() << "failed to decode UTF-8 string at pos " << pos << ::NDetail::InStringMsg(s.data(), s.size()); } resize(oldSize + written); @@ -84,11 +84,11 @@ bool TBasicString<wchar16, std::char_traits<wchar16>>::to_title(size_t pos, size template <> TUtf32String& TBasicString<wchar32, std::char_traits<wchar32>>::AppendAscii(const ::TStringBuf& s) { - ReserveAndResize(size() + s.size()); + ReserveAndResize(size() + s.size()); - auto dst = begin() + size() - s.size(); + auto dst = begin() + size() - s.size(); - for (const char* src = s.data(); dst != end(); ++dst, ++src) { + for (const char* src = s.data(); dst != end(); ++dst, ++src) { *dst = static_cast<wchar32>(*src); } @@ -113,11 +113,11 @@ template <> TUtf32String& TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf8(const ::TStringBuf& s) { size_t oldSize = size(); - ReserveAndResize(size() + s.size() * 4); + ReserveAndResize(size() + s.size() * 4); size_t written = 0; - size_t pos = UTF8ToWideImpl(s.data(), s.size(), begin() + oldSize, written); + size_t pos = UTF8ToWideImpl(s.data(), s.size(), begin() + oldSize, written); if (pos != s.size()) { - ythrow yexception() << "failed to decode UTF-8 string at pos " << pos << ::NDetail::InStringMsg(s.data(), s.size()); + ythrow yexception() << "failed to decode UTF-8 string at pos " << pos << ::NDetail::InStringMsg(s.data(), s.size()); } resize(oldSize + written); @@ -128,11 +128,11 @@ template <> TUtf32String& TBasicString<wchar32, std::char_traits<wchar32>>::AppendUtf16(const ::TWtringBuf& s) { size_t oldSize = size(); - ReserveAndResize(size() + s.size() * 2); + ReserveAndResize(size() + s.size() * 2); wchar32* oldEnd = begin() + oldSize; wchar32* end = oldEnd; - NDetail::UTF16ToUTF32ImplScalar(s.data(), s.data() + s.size(), end); + NDetail::UTF16ToUTF32ImplScalar(s.data(), s.data() + s.size(), end); size_t written = end - oldEnd; resize(oldSize + written); diff --git a/util/generic/string.h b/util/generic/string.h index 6e55f0dd67..8cd8aa6917 100644 --- a/util/generic/string.h +++ b/util/generic/string.h @@ -16,8 +16,8 @@ #include "explicit_type.h" #include "reserve.h" #include "singleton.h" -#include "strbase.h" -#include "strbuf.h" +#include "strbase.h" +#include "strbuf.h" #include "string_hash.h" #if defined(address_sanitizer_enabled) || defined(thread_sanitizer_enabled) @@ -192,8 +192,8 @@ public: static size_t res = TStringType().max_size(); return res; - } - + } + protected: #ifdef TSTRING_IS_STD_STRING TStorage Storage_; @@ -498,7 +498,7 @@ public: { } - explicit TBasicString(const TBasicStringBuf<TCharType, TTraits> s) + explicit TBasicString(const TBasicStringBuf<TCharType, TTraits> s) : TBasicString(s.data(), s.size()) { } @@ -514,15 +514,15 @@ public: * Certain invocations of this method will result in link-time error. * You are free to implement corresponding methods in string.cpp if you need them. */ - static TBasicString FromAscii(const ::TStringBuf& s) { + static TBasicString FromAscii(const ::TStringBuf& s) { return TBasicString().AppendAscii(s); } - static TBasicString FromUtf8(const ::TStringBuf& s) { + static TBasicString FromUtf8(const ::TStringBuf& s) { return TBasicString().AppendUtf8(s); } - static TBasicString FromUtf16(const ::TWtringBuf& s) { + static TBasicString FromUtf16(const ::TWtringBuf& s) { return TBasicString().AppendUtf16(s); } @@ -532,8 +532,8 @@ public: private: template <typename... R> - static size_t SumLength(const TBasicStringBuf<TCharType, TTraits> s1, const R&... r) noexcept { - return s1.size() + SumLength(r...); + static size_t SumLength(const TBasicStringBuf<TCharType, TTraits> s1, const R&... r) noexcept { + return s1.size() + SumLength(r...); } template <typename... R> @@ -546,9 +546,9 @@ private: } template <typename... R> - static void CopyAll(TCharType* p, const TBasicStringBuf<TCharType, TTraits> s, const R&... r) { + static void CopyAll(TCharType* p, const TBasicStringBuf<TCharType, TTraits> s, const R&... r) { TTraits::copy(p, s.data(), s.size()); - CopyAll(p + s.size(), r...); + CopyAll(p + s.size(), r...); } template <typename... R, class TNextCharType, typename = std::enable_if_t<std::is_same<TCharType, TNextCharType>::value>> @@ -646,11 +646,11 @@ public: return AssignNoAlias(b, e - b); } - TBasicString& AssignNoAlias(const TBasicStringBuf<TCharType, TTraits> s) { - return AssignNoAlias(s.data(), s.size()); + TBasicString& AssignNoAlias(const TBasicStringBuf<TCharType, TTraits> s) { + return AssignNoAlias(s.data(), s.size()); } - TBasicString& AssignNoAlias(const TBasicStringBuf<TCharType, TTraits> s, size_t spos, size_t sn = TBase::npos) { + TBasicString& AssignNoAlias(const TBasicStringBuf<TCharType, TTraits> s, size_t spos, size_t sn = TBase::npos) { return AssignNoAlias(s.SubString(spos, sn)); } @@ -659,17 +659,17 @@ public: * Certain invocations of this method will result in link-time error. * You are free to implement corresponding methods in string.cpp if you need them. */ - auto AssignAscii(const ::TStringBuf& s) { + auto AssignAscii(const ::TStringBuf& s) { clear(); return AppendAscii(s); } - auto AssignUtf8(const ::TStringBuf& s) { + auto AssignUtf8(const ::TStringBuf& s) { clear(); return AppendUtf8(s); } - auto AssignUtf16(const ::TWtringBuf& s) { + auto AssignUtf16(const ::TWtringBuf& s) { clear(); return AppendUtf16(s); } @@ -690,7 +690,7 @@ public: return *this; } - TBasicString& operator=(const TBasicStringBuf<TCharType, TTraits> s) { + TBasicString& operator=(const TBasicStringBuf<TCharType, TTraits> s) { return assign(s); } @@ -769,19 +769,19 @@ public: return *this; } - TBasicString& AppendNoAlias(const TBasicStringBuf<TCharType, TTraits> s) { - return AppendNoAlias(s.data(), s.size()); + TBasicString& AppendNoAlias(const TBasicStringBuf<TCharType, TTraits> s) { + return AppendNoAlias(s.data(), s.size()); } - TBasicString& AppendNoAlias(const TBasicStringBuf<TCharType, TTraits> s, size_t spos, size_t sn = TBase::npos) { + TBasicString& AppendNoAlias(const TBasicStringBuf<TCharType, TTraits> s, size_t spos, size_t sn = TBase::npos) { return AppendNoAlias(s.SubString(spos, sn)); } - TBasicString& append(const TBasicStringBuf<TCharType, TTraits> s) { - return append(s.data(), s.size()); + TBasicString& append(const TBasicStringBuf<TCharType, TTraits> s) { + return append(s.data(), s.size()); } - TBasicString& append(const TBasicStringBuf<TCharType, TTraits> s, size_t spos, size_t sn = TBase::npos) { + TBasicString& append(const TBasicStringBuf<TCharType, TTraits> s, size_t spos, size_t sn = TBase::npos) { return append(s.SubString(spos, sn)); } @@ -794,11 +794,11 @@ public: * Certain invocations of this method will result in link-time error. * You are free to implement corresponding methods in string.cpp if you need them. */ - TBasicString& AppendAscii(const ::TStringBuf& s); + TBasicString& AppendAscii(const ::TStringBuf& s); - TBasicString& AppendUtf8(const ::TStringBuf& s); + TBasicString& AppendUtf8(const ::TStringBuf& s); - TBasicString& AppendUtf16(const ::TWtringBuf& s); + TBasicString& AppendUtf16(const ::TWtringBuf& s); inline void push_back(TCharType c) { // TODO @@ -884,7 +884,7 @@ public: return std::move(s1); } - friend TBasicString operator+(TBasicString&& s1, const TBasicStringBuf<TCharType, TTraits> s2) Y_WARN_UNUSED_RESULT { + friend TBasicString operator+(TBasicString&& s1, const TBasicStringBuf<TCharType, TTraits> s2) Y_WARN_UNUSED_RESULT { s1 += s2; return std::move(s1); } @@ -907,7 +907,7 @@ public: return Join(s1, s2); } - friend TBasicString operator+(const TBasicString& s1, const TBasicStringBuf<TCharType, TTraits> s2) Y_WARN_UNUSED_RESULT { + friend TBasicString operator+(const TBasicString& s1, const TBasicStringBuf<TCharType, TTraits> s2) Y_WARN_UNUSED_RESULT { return Join(s1, s2); } @@ -916,7 +916,7 @@ public: } friend TBasicString operator+(const TBasicString& s1, TCharType s2) Y_WARN_UNUSED_RESULT { - return Join(s1, TBasicStringBuf<TCharType, TTraits>(&s2, 1)); + return Join(s1, TBasicStringBuf<TCharType, TTraits>(&s2, 1)); } friend TBasicString operator+(const TCharType* s1, TBasicString&& s2) Y_WARN_UNUSED_RESULT { @@ -924,12 +924,12 @@ public: return std::move(s2); } - friend TBasicString operator+(const TBasicStringBuf<TCharType, TTraits> s1, TBasicString&& s2) Y_WARN_UNUSED_RESULT { + friend TBasicString operator+(const TBasicStringBuf<TCharType, TTraits> s1, TBasicString&& s2) Y_WARN_UNUSED_RESULT { s2.prepend(s1); return std::move(s2); } - friend TBasicString operator+(const TBasicStringBuf<TCharType, TTraits> s1, const TBasicString& s2) Y_WARN_UNUSED_RESULT { + friend TBasicString operator+(const TBasicStringBuf<TCharType, TTraits> s1, const TBasicString& s2) Y_WARN_UNUSED_RESULT { return Join(s1, s2); } @@ -976,7 +976,7 @@ public: return *this; } - TBasicString& prepend(const TBasicStringBuf<TCharType, TTraits> s, size_t spos = 0, size_t sn = TBase::npos) { + TBasicString& prepend(const TBasicStringBuf<TCharType, TTraits> s, size_t spos = 0, size_t sn = TBase::npos) { return insert(0, s, spos, sn); } @@ -1029,7 +1029,7 @@ public: return this->insert(pos, 1, ch); } - TBasicString& insert(size_t pos, const TBasicStringBuf<TCharType, TTraits> s, size_t spos = 0, size_t sn = TBase::npos) { + TBasicString& insert(size_t pos, const TBasicStringBuf<TCharType, TTraits> s, size_t spos = 0, size_t sn = TBase::npos) { MutRef().insert(pos, s, spos, sn); return *this; diff --git a/util/str_stl.h b/util/str_stl.h index 4b98c82ee1..f1e137181d 100644 --- a/util/str_stl.h +++ b/util/str_stl.h @@ -23,8 +23,8 @@ namespace std { bool operator()(const char* x, const char* y) const { return strcmp(x, y) == 0; } - bool operator()(const char* x, const TStringBuf y) const { - return strlen(x) == y.size() && memcmp(x, y.data(), y.size()) == 0; + bool operator()(const char* x, const TStringBuf y) const { + return strlen(x) == y.size() && memcmp(x, y.data(), y.size()) == 0; } using is_transparent = void; }; diff --git a/util/stream/output.cpp b/util/stream/output.cpp index 6eab28d41b..db81b81b70 100644 --- a/util/stream/output.cpp +++ b/util/stream/output.cpp @@ -115,18 +115,18 @@ void Out<std::u32string_view>(IOutputStream& o, const std::u32string_view& p) { } template <> -void Out<TStringBuf>(IOutputStream& o, const TStringBuf& p) { - o.Write(p.data(), p.length()); +void Out<TStringBuf>(IOutputStream& o, const TStringBuf& p) { + o.Write(p.data(), p.length()); } template <> -void Out<TWtringBuf>(IOutputStream& o, const TWtringBuf& p) { - WriteString(o, p.data(), p.length()); +void Out<TWtringBuf>(IOutputStream& o, const TWtringBuf& p) { + WriteString(o, p.data(), p.length()); } template <> -void Out<TUtf32StringBuf>(IOutputStream& o, const TUtf32StringBuf& p) { - WriteString(o, p.data(), p.length()); +void Out<TUtf32StringBuf>(IOutputStream& o, const TUtf32StringBuf& p) { + WriteString(o, p.data(), p.length()); } template <> diff --git a/util/string/ascii.cpp b/util/string/ascii.cpp index bec423539b..95edb95cc8 100644 --- a/util/string/ascii.cpp +++ b/util/string/ascii.cpp @@ -43,16 +43,16 @@ extern const unsigned char NPrivate::ASCII_LOWER[256] = { }; // clang-format on -int AsciiCompareIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { - if (s1.size() <= s2.size()) { - if (int cmp = strnicmp(s1.data(), s2.data(), s1.size())) { +int AsciiCompareIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { + if (s1.size() <= s2.size()) { + if (int cmp = strnicmp(s1.data(), s2.data(), s1.size())) { return cmp; } - return (s1.size() < s2.size()) ? -1 : 0; + return (s1.size() < s2.size()) ? -1 : 0; } - Y_ASSERT(s1.size() > s2.size()); - if (int cmp = strnicmp(s1.data(), s2.data(), s2.size())) { + Y_ASSERT(s1.size() > s2.size()); + if (int cmp = strnicmp(s1.data(), s2.data(), s2.size())) { return cmp; } return 1; diff --git a/util/string/ascii.h b/util/string/ascii.h index ac63cafa66..10344384d3 100644 --- a/util/string/ascii.h +++ b/util/string/ascii.h @@ -179,8 +179,8 @@ static inline bool AsciiEqualsIgnoreCase(const char* s1, const char* s2) noexcep * * @return true iff @c s1 ans @c s2 are case-insensitively equal. */ -static inline bool AsciiEqualsIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { - return (s1.size() == s2.size()) && strnicmp(s1.data(), s2.data(), s1.size()) == 0; +static inline bool AsciiEqualsIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { + return (s1.size() == s2.size()) && strnicmp(s1.data(), s2.data(), s1.size()) == 0; } /** @@ -222,8 +222,8 @@ Y_PURE_FUNCTION int AsciiCompareIgnoreCase(const TStringBuf s1, const TStringBuf * * @return true iff @c s2 are case-sensitively prefix of @c s1. */ -static inline bool AsciiHasPrefix(const TStringBuf s1, const TStringBuf s2) noexcept { - return (s1.size() >= s2.size()) && memcmp(s1.data(), s2.data(), s2.size()) == 0; +static inline bool AsciiHasPrefix(const TStringBuf s1, const TStringBuf s2) noexcept { + return (s1.size() >= s2.size()) && memcmp(s1.data(), s2.data(), s2.size()) == 0; } /** @@ -232,8 +232,8 @@ static inline bool AsciiHasPrefix(const TStringBuf s1, const TStringBuf s2) noex * * @return true iff @c s2 are case-insensitively prefix of @c s1. */ -static inline bool AsciiHasPrefixIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { - return (s1.size() >= s2.size()) && strnicmp(s1.data(), s2.data(), s2.size()) == 0; +static inline bool AsciiHasPrefixIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { + return (s1.size() >= s2.size()) && strnicmp(s1.data(), s2.data(), s2.size()) == 0; } /** @@ -242,6 +242,6 @@ static inline bool AsciiHasPrefixIgnoreCase(const TStringBuf s1, const TStringBu * * @return true iff @c s2 are case-insensitively suffix of @c s1. */ -static inline bool AsciiHasSuffixIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { - return (s1.size() >= s2.size()) && strnicmp((s1.data() + (s1.size() - s2.size())), s2.data(), s2.size()) == 0; +static inline bool AsciiHasSuffixIgnoreCase(const TStringBuf s1, const TStringBuf s2) noexcept { + return (s1.size() >= s2.size()) && strnicmp((s1.data() + (s1.size() - s2.size())), s2.data(), s2.size()) == 0; } diff --git a/util/string/vector.cpp b/util/string/vector.cpp index 5bb5fbfe3b..9ba401f0a2 100644 --- a/util/string/vector.cpp +++ b/util/string/vector.cpp @@ -5,12 +5,12 @@ #include <util/system/defaults.h> template <class TConsumer, class TDelim, typename TChr> -static inline void DoSplit2(TConsumer& c, TDelim& d, const TBasicStringBuf<TChr> str, int) { - SplitString(str.data(), str.data() + str.size(), d, c); +static inline void DoSplit2(TConsumer& c, TDelim& d, const TBasicStringBuf<TChr> str, int) { + SplitString(str.data(), str.data() + str.size(), d, c); } template <class TConsumer, class TDelim, typename TChr> -static inline void DoSplit1(TConsumer& cc, TDelim& d, const TBasicStringBuf<TChr> str, int opts) { +static inline void DoSplit1(TConsumer& cc, TDelim& d, const TBasicStringBuf<TChr> str, int opts) { if (opts & KEEP_EMPTY_TOKENS) { DoSplit2(cc, d, str, opts); } else { @@ -21,11 +21,11 @@ static inline void DoSplit1(TConsumer& cc, TDelim& d, const TBasicStringBuf<TChr } template <class C, class TDelim, typename TChr> -static inline void DoSplit0(C* res, const TBasicStringBuf<TChr> str, TDelim& d, size_t maxFields, int options) { +static inline void DoSplit0(C* res, const TBasicStringBuf<TChr> str, TDelim& d, size_t maxFields, int options) { using TStringType = std::conditional_t<std::is_same<TChr, wchar16>::value, TUtf16String, TString>; res->clear(); - if (!str.data()) { + if (!str.data()) { return; } @@ -38,7 +38,7 @@ static inline void DoSplit0(C* res, const TBasicStringBuf<TChr> str, TDelim& d, DoSplit1(lc, d, str, options); if (lc.Last) { - res->push_back(TStringType(lc.Last, str.data() + str.size() - lc.Last)); + res->push_back(TStringType(lc.Last, str.data() + str.size() - lc.Last)); } } else { DoSplit1(cc, d, str, options); @@ -64,19 +64,19 @@ static void SplitStringImplT(TVector<std::conditional_t<std::is_same<TChr, wchar } void ::NPrivate::SplitStringImpl(TVector<TString>* res, const char* ptr, const char* delim, size_t maxFields, int options) { - return SplitStringImplT<char>(res, TStringBuf(ptr), delim, maxFields, options); + return SplitStringImplT<char>(res, TStringBuf(ptr), delim, maxFields, options); } void ::NPrivate::SplitStringImpl(TVector<TString>* res, const char* ptr, size_t len, const char* delim, size_t maxFields, int options) { - return SplitStringImplT<char>(res, TStringBuf(ptr, len), delim, maxFields, options); + return SplitStringImplT<char>(res, TStringBuf(ptr, len), delim, maxFields, options); } void ::NPrivate::SplitStringImpl(TVector<TUtf16String>* res, const wchar16* ptr, const wchar16* delimiter, size_t maxFields, int options) { - return SplitStringImplT<wchar16>(res, TWtringBuf(ptr), delimiter, maxFields, options); + return SplitStringImplT<wchar16>(res, TWtringBuf(ptr), delimiter, maxFields, options); } void ::NPrivate::SplitStringImpl(TVector<TUtf16String>* res, const wchar16* ptr, size_t len, const wchar16* delimiter, size_t maxFields, int options) { - return SplitStringImplT<wchar16>(res, TWtringBuf(ptr, len), delimiter, maxFields, options); + return SplitStringImplT<wchar16>(res, TWtringBuf(ptr, len), delimiter, maxFields, options); } TUtf16String JoinStrings(const TVector<TUtf16String>& v, const TWtringBuf delim) { diff --git a/util/system/fs_win.cpp b/util/system/fs_win.cpp index 44a4c54935..a410ccac06 100644 --- a/util/system/fs_win.cpp +++ b/util/system/fs_win.cpp @@ -91,7 +91,7 @@ namespace NFsPrivate { if (linkDir) { TString fullTarget(tName); - resolvepath(fullTarget, TString{linkDir}); + resolvepath(fullTarget, TString{linkDir}); TUtf16String fullTargetW; LPCWSTR ptrFullTarget = UTF8ToWCHAR(fullTarget, fullTargetW); attr = ::GetFileAttributesW(ptrFullTarget); diff --git a/ydb/core/tablet_flat/test/tool/surg/main.cpp b/ydb/core/tablet_flat/test/tool/surg/main.cpp index b293eb81bf..c196de6a7e 100644 --- a/ydb/core/tablet_flat/test/tool/surg/main.cpp +++ b/ydb/core/tablet_flat/test/tool/surg/main.cpp @@ -221,12 +221,12 @@ namespace NTest { Cerr << (slice.FirstInclusive ? '[' : '('); Cerr << "row " << slice.FirstRowId; for (auto cell : slice.FirstKey.GetCells()) { - Cerr << " cell " << TString{cell.AsBuf()}.Quote(); + Cerr << " cell " << TString{cell.AsBuf()}.Quote(); } Cerr << ", "; Cerr << "row " << slice.LastRowId; for (auto cell : slice.LastKey.GetCells()) { - Cerr << " cell " << TString{cell.AsBuf()}.Quote(); + Cerr << " cell " << TString{cell.AsBuf()}.Quote(); } Cerr << (slice.LastInclusive ? ']' : ')'); Cerr << Endl; diff --git a/ydb/library/backup/query_builder.cpp b/ydb/library/backup/query_builder.cpp index b2c9b39e00..dd931c82bb 100644 --- a/ydb/library/backup/query_builder.cpp +++ b/ydb/library/backup/query_builder.cpp @@ -57,7 +57,7 @@ TMaybe<TString> TryParse(const TStringBuf& buf) { } Y_ENSURE(buf.Size() >= 1 && buf.front() == '"' && buf.back() == '"', - "Source string neither surrounded by quotes nor equals to null, string# " << TString{buf}.Quote()); + "Source string neither surrounded by quotes nor equals to null, string# " << TString{buf}.Quote()); TString tmp; TMemoryInput stream(buf.Data() + 1, buf.Size() - 2); stream >> tmp; diff --git a/ydb/library/backup/util.cpp b/ydb/library/backup/util.cpp index 03eb78e76a..332d29ac8e 100644 --- a/ydb/library/backup/util.cpp +++ b/ydb/library/backup/util.cpp @@ -73,7 +73,7 @@ ui64 SizeFromString(TStringBuf s) { TStringBuf number; s.SplitAt(pos, number, suffix); auto it = SizeSuffix.find(suffix); - Y_ENSURE(it != SizeSuffix.end(), "Cannot parse string, unknown suffix# " << TString{suffix}.Quote()); + Y_ENSURE(it != SizeSuffix.end(), "Cannot parse string, unknown suffix# " << TString{suffix}.Quote()); return FromString<ui64>(number) * it->second; } diff --git a/ydb/library/yql/ast/yql_constraint.h b/ydb/library/yql/ast/yql_constraint.h index 2390a0db55..c093f3c9f4 100644 --- a/ydb/library/yql/ast/yql_constraint.h +++ b/ydb/library/yql/ast/yql_constraint.h @@ -74,7 +74,7 @@ public: "Should be derived from TConstraintNode"); const auto ret = dynamic_cast<const T*>(this); - YQL_ENSURE(ret, "Cannot cast " << TString{Name_}.Quote() << " constraint to " << T::Name()); + YQL_ENSURE(ret, "Cannot cast " << TString{Name_}.Quote() << " constraint to " << T::Name()); return ret; } diff --git a/ydb/library/yql/ast/yql_expr.cpp b/ydb/library/yql/ast/yql_expr.cpp index 3dde469b3a..82f6c5812a 100644 --- a/ydb/library/yql/ast/yql_expr.cpp +++ b/ydb/library/yql/ast/yql_expr.cpp @@ -2640,7 +2640,7 @@ bool ValidateName(TPosition position, TStringBuf name, TStringBuf descr, TExprCo if (!IsUtf8(name)) { ctx.AddError(TIssue(position, TStringBuilder() << - TString(descr).to_title() << " name must be a valid utf-8 byte sequence: " << TString{name}.Quote())); + TString(descr).to_title() << " name must be a valid utf-8 byte sequence: " << TString{name}.Quote())); return false; } diff --git a/ydb/library/yql/core/type_ann/type_ann_core.cpp b/ydb/library/yql/core/type_ann/type_ann_core.cpp index 48f17e1706..5846e6cb10 100644 --- a/ydb/library/yql/core/type_ann/type_ann_core.cpp +++ b/ydb/library/yql/core/type_ann/type_ann_core.cpp @@ -579,7 +579,7 @@ namespace NTypeAnnImpl { if (!NYql::NDecimal::IsValid(input->Head().Content())) { ctx.Expr.AddError(TIssue(ctx.Expr.GetPosition(input->Pos()), TStringBuilder() << "Bad atom format for type: " - << input->Content() << ", value: " << TString{input->Head().Content()}.Quote())); + << input->Content() << ", value: " << TString{input->Head().Content()}.Quote())); return IGraphTransformer::TStatus::Error; } @@ -6997,7 +6997,7 @@ template <NKikimr::NUdf::EDataSlot DataSlot> double val = 0.; if (!TryFromString(setting->Child(1)->Content(), val) || val == 0.) { ctx.Expr.AddError(TIssue(ctx.Expr.GetPosition(nameNode->Pos()), TStringBuilder() - << "Bad " << TString{nameNode->Content()}.Quote() << " setting value: " << setting->Child(1)->Content())); + << "Bad " << TString{nameNode->Content()}.Quote() << " setting value: " << setting->Child(1)->Content())); return IGraphTransformer::TStatus::Error; } } @@ -7005,7 +7005,7 @@ template <NKikimr::NUdf::EDataSlot DataSlot> ui64 val = 0; if (!TryFromString(setting->Child(1)->Content(), val)) { ctx.Expr.AddError(TIssue(ctx.Expr.GetPosition(nameNode->Pos()), TStringBuilder() - << "Bad " << TString{nameNode->Content()}.Quote() << " setting value: " << setting->Child(1)->Content())); + << "Bad " << TString{nameNode->Content()}.Quote() << " setting value: " << setting->Child(1)->Content())); return IGraphTransformer::TStatus::Error; } } diff --git a/ydb/library/yql/core/yql_expr_constraint.cpp b/ydb/library/yql/core/yql_expr_constraint.cpp index 16cc9308ed..78c8f68776 100644 --- a/ydb/library/yql/core/yql_expr_constraint.cpp +++ b/ydb/library/yql/core/yql_expr_constraint.cpp @@ -1090,7 +1090,7 @@ private: for (size_t i = 0; i < commonPrefixLength; ++i) { auto column = sort->GetContent()[i].first.front(); auto pos = resultStruct->FindItem(column); - YQL_ENSURE(pos, "Missing column " << TString{column}.Quote() << " in result type"); + YQL_ENSURE(pos, "Missing column " << TString{column}.Quote() << " in result type"); auto resultItemType = resultStruct->GetItems()[*pos]; for (size_t childNdx = 0; childNdx < input->ChildrenSize(); ++childNdx) { const auto inputStruct = inputStructs[childNdx]; @@ -3049,7 +3049,7 @@ private: // Sanity check for (size_t i = 0; i < input->ChildrenSize(); ++i) { YQL_ENSURE(input->Child(i)->GetState() >= TExprNode::EState::ConstrComplete, - "Child with index " << i << " of callable " << TString{input->Content()}.Quote() << " has bad state after constraint transform"); + "Child with index " << i << " of callable " << TString{input->Content()}.Quote() << " has bad state after constraint transform"); } input->SetState(TExprNode::EState::ConstrComplete); CheckExpected(*input); diff --git a/ydb/library/yql/providers/config/yql_config_provider.cpp b/ydb/library/yql/providers/config/yql_config_provider.cpp index e640a4a85a..6952e96cf0 100644 --- a/ydb/library/yql/providers/config/yql_config_provider.cpp +++ b/ydb/library/yql/providers/config/yql_config_provider.cpp @@ -613,7 +613,7 @@ namespace { return false; } for (auto arg: args) { - Types.DisableConstraintCheck.erase(TString{arg}); + Types.DisableConstraintCheck.erase(TString{arg}); } } else if (name == "DisableConstraints") { @@ -669,7 +669,7 @@ namespace { return false; } - auto arg = TString{args[0]}; + auto arg = TString{args[0]}; if (Find(Types.AvailablePureResultDataSources, DqProviderName) == Types.AvailablePureResultDataSources.end() || arg == "disable") { ; // reserved } else if (arg == "auto") { @@ -967,8 +967,8 @@ namespace { return false; } - TString codePattern = TString{args[0]}; - TString action = TString{args[1]}; + TString codePattern = TString{args[0]}; + TString action = TString{args[1]}; TWarningRule rule; TString parseError; diff --git a/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource.cpp b/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource.cpp index 90d83bad82..31ceb1701c 100644 --- a/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource.cpp +++ b/ydb/library/yql/providers/solomon/provider/yql_solomon_datasource.cpp @@ -19,7 +19,7 @@ public: TSolomonDataSource(TSolomonState::TPtr state) : State_(state) , ConfigurationTransformer_(NCommon::CreateProviderConfigurationTransformer( - State_->Configuration, *State_->Types, TString{SolomonProviderName})) + State_->Configuration, *State_->Types, TString{SolomonProviderName})) , IODiscoveryTransformer_(CreateSolomonIODiscoveryTransformer(State_)) , LoadMetaDataTransformer_(CreateSolomonLoadTableMetadataTransformer(State_)) , TypeAnnotationTransformer_(CreateSolomonDataSourceTypeAnnotationTransformer(State_)) diff --git a/ydb/library/yql/providers/solomon/provider/yql_solomon_provider.cpp b/ydb/library/yql/providers/solomon/provider/yql_solomon_provider.cpp index 895d4481e1..d84f1502a6 100644 --- a/ydb/library/yql/providers/solomon/provider/yql_solomon_provider.cpp +++ b/ydb/library/yql/providers/solomon/provider/yql_solomon_provider.cpp @@ -36,7 +36,7 @@ TDataProviderInitializer GetSolomonDataProviderInitializer(ISolomonGateway::TPtr TDataProviderInfo info; - info.Names.insert({TString{SolomonProviderName}}); + info.Names.insert({TString{SolomonProviderName}}); info.Source = CreateSolomonDataSource(solomonState); info.Sink = CreateSolomonDataSink(solomonState); diff --git a/ydb/public/lib/ydb_cli/commands/ydb_service_export.cpp b/ydb/public/lib/ydb_cli/commands/ydb_service_export.cpp index eeea874e4a..f997343dc8 100644 --- a/ydb/public/lib/ydb_cli/commands/ydb_service_export.cpp +++ b/ydb/public/lib/ydb_cli/commands/ydb_service_export.cpp @@ -31,7 +31,7 @@ namespace { ThrowOnError(ret.Status); if (ret.Entries.size() == 1 && srcPath == ret.Entries[0].Name) { - return {{TString{srcPath}, TString{dstPath}}}; + return {{TString{srcPath}, TString{dstPath}}}; } TVector<std::pair<TString, TString>> result; |