text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: osrf_testing_tools_cpp/src/memory_tools/count_function_occurrences_in_backtrace.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/count_function_occurrences_in_backtrace.hpp", "license": "apa... |
### File: osrf_testing_tools_cpp/src/memory_tools/custom_memory_functions.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/custom_memory_functions.cpp", "license": "apache-2.0", "size"... |
### File: osrf_testing_tools_cpp/src/memory_tools/custom_memory_functions.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/custom_memory_functions.hpp", "license": "apache-2.0", "size"... |
### File: osrf_testing_tools_cpp/src/memory_tools/dispatch_callback.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// h... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/dispatch_callback.hpp", "license": "apache-2.0", "size": 1508... |
### File: osrf_testing_tools_cpp/src/memory_tools/impl/apple.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/impl/apple.cpp", "license": "apache-2.0", "size": 2219} |
### File: osrf_testing_tools_cpp/src/memory_tools/impl/linux.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/impl/linux.cpp", "license": "apache-2.0", "size": 4370} |
### File: osrf_testing_tools_cpp/src/memory_tools/impl/static_allocator.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/impl/static_allocator.hpp", "license": "apache-2.0", "size": ... |
### File: osrf_testing_tools_cpp/src/memory_tools/impl/unix_common.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ht... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/impl/unix_common.cpp", "license": "apache-2.0", "size": 3964} |
### File: osrf_testing_tools_cpp/src/memory_tools/impl/unix_common.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ht... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/impl/unix_common.hpp", "license": "apache-2.0", "size": 1257} |
### File: osrf_testing_tools_cpp/src/memory_tools/impl/unsupported_os.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/impl/unsupported_os.cpp", "license": "apache-2.0", "size": 94... |
### File: osrf_testing_tools_cpp/src/memory_tools/implementation_monitoring_override.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the Licen... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/implementation_monitoring_override.cpp", "license": "apache-2... |
### File: osrf_testing_tools_cpp/src/memory_tools/implementation_monitoring_override.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the Licen... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/implementation_monitoring_override.hpp", "license": "apache-2... |
### File: osrf_testing_tools_cpp/src/memory_tools/initialize.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/initialize.cpp", "license": "apache-2.0", "size": 1861} |
### File: osrf_testing_tools_cpp/src/memory_tools/is_working.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/is_working.cpp", "license": "apache-2.0", "size": 1784} |
### File: osrf_testing_tools_cpp/src/memory_tools/memory_tools.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http:/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/memory_tools.cpp", "license": "apache-2.0", "size": 1041} |
### File: osrf_testing_tools_cpp/src/memory_tools/memory_tools_service.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/memory_tools_service.cpp", "license": "apache-2.0", "size": 3... |
### File: osrf_testing_tools_cpp/src/memory_tools/memory_tools_service_factory.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/memory_tools_service_factory.hpp", "license": "apache-2.0", "... |
### File: osrf_testing_tools_cpp/src/memory_tools/memory_tools_service_impl.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/memory_tools_service_impl.hpp", "license": "apache-2.0", "siz... |
### File: osrf_testing_tools_cpp/src/memory_tools/monitoring.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/monitoring.cpp", "license": "apache-2.0", "size": 1935} |
### File: osrf_testing_tools_cpp/src/memory_tools/print_backtrace.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// htt... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/print_backtrace.hpp", "license": "apache-2.0", "size": 1583} |
### File: osrf_testing_tools_cpp/src/memory_tools/register_hooks.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/register_hooks.cpp", "license": "apache-2.0", "size": 3468} |
### File: osrf_testing_tools_cpp/src/memory_tools/safe_fwrite.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/safe_fwrite.hpp", "license": "apache-2.0", "size": 1097} |
### File: osrf_testing_tools_cpp/src/memory_tools/stack_trace.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/stack_trace.cpp", "license": "apache-2.0", "size": 4469} |
### File: osrf_testing_tools_cpp/src/memory_tools/stack_trace_impl.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ht... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/stack_trace_impl.hpp", "license": "apache-2.0", "size": 3418} |
### File: osrf_testing_tools_cpp/src/memory_tools/test_count_function_in_backtrace.cpp
void func();
int main(void)
{
func();
return 0;
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/test_count_function_in_backtrace.cpp", "license": "apache-2.0... |
### File: osrf_testing_tools_cpp/src/memory_tools/test_lib.cpp
#include "./count_function_occurrences_in_backtrace.hpp"
void func()
{
printf("entering func()\n");
static size_t recurse_count = 0;
if (
recurse_count++ < 10 &&
osrf_testing_tools_cpp::memory_tools::count_function_occurrences_in_backtrace(fu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/test_lib.cpp", "license": "apache-2.0", "size": 337} |
### File: osrf_testing_tools_cpp/src/memory_tools/testing_helpers.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// htt... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/testing_helpers.cpp", "license": "apache-2.0", "size": 2956} |
### File: osrf_testing_tools_cpp/src/memory_tools/verbosity.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://ww... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/memory_tools/verbosity.cpp", "license": "apache-2.0", "size": 2334} |
### File: osrf_testing_tools_cpp/src/test_runner/CMakeLists.txt
add_executable(test_runner main.cpp)
install(TARGETS test_runner
EXPORT test_runner
DESTINATION lib/${PROJECT_NAME}
)
install(EXPORT test_runner
DESTINATION share/${PROJECT_NAME}/cmake
NAMESPACE "${PROJECT_NAME}::"
FILE "test_runnerExport.cmake... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/test_runner/CMakeLists.txt", "license": "apache-2.0", "size": 260} |
### File: osrf_testing_tools_cpp/src/test_runner/execute_process.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/test_runner/execute_process.hpp", "license": "apache-2.0", "size": 3872} |
### File: osrf_testing_tools_cpp/src/test_runner/get_environment_variable.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/test_runner/get_environment_variable.hpp", "license": "apache-2.0", "size"... |
### File: osrf_testing_tools_cpp/src/test_runner/main.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apac... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/test_runner/main.cpp", "license": "apache-2.0", "size": 4834} |
### File: osrf_testing_tools_cpp/src/test_runner/parse_environment_variable.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/test_runner/parse_environment_variable.hpp", "license": "apache-2.0", "siz... |
### File: osrf_testing_tools_cpp/src/test_runner/starts_with.hpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/src/test_runner/starts_with.hpp", "license": "apache-2.0", "size": 1307} |
### File: osrf_testing_tools_cpp/test/CMakeLists.txt
add_subdirectory(cmake)
add_subdirectory(memory_tools)
add_subdirectory(test_runner)
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/CMakeLists.txt", "license": "apache-2.0", "size": 85} |
### File: osrf_testing_tools_cpp/test/cmake/CMakeLists.txt
# Test logic for version filtering when selecting googletest version.
add_test(
NAME "test_osrf_testing_tools_cpp_filter_versions_cmake"
COMMAND
${CMAKE_COMMAND} -P
"${CMAKE_SOURCE_DIR}/test/cmake/test_osrf_testing_tools_cpp_filter_versions.cmake"
) | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/cmake/CMakeLists.txt", "license": "apache-2.0", "size": 261} |
### File: osrf_testing_tools_cpp/test/cmake/test_osrf_testing_tools_cpp_filter_versions.cmake
# Copyright 2018 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licen... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/cmake/test_osrf_testing_tools_cpp_filter_versions.cmake", "license": "a... |
### File: osrf_testing_tools_cpp/test/memory_tools/CMakeLists.txt
# Create tests for the memory tools library.
add_executable(test_memory_tools test_memory_tools.cpp)
target_link_libraries(test_memory_tools
memory_tools
gtest_main
)
target_include_directories(test_memory_tools
PRIVATE ${memory_tools_src_dir_inter... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/memory_tools/CMakeLists.txt", "license": "apache-2.0", "size": 505} |
### File: osrf_testing_tools_cpp/test/memory_tools/test_memory_tools.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/memory_tools/test_memory_tools.cpp", "license": "apache-2.0", "size": 974... |
### File: osrf_testing_tools_cpp/test/test_runner/CMakeLists.txt
# Test parsing of environment variables
add_executable(test_parse_environment_variable test_parse_environment_variable.cpp)
# gtest_main is found by osrf_testing_tools_cpp_require_googletest(), called in main CMakeLists.txt
target_link_libraries(test_pars... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/test_runner/CMakeLists.txt", "license": "apache-2.0", "size": 1360} |
### File: osrf_testing_tools_cpp/test/test_runner/assert_env_vars.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// htt... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/test_runner/assert_env_vars.cpp", "license": "apache-2.0", "size": 3036} |
### File: osrf_testing_tools_cpp/test/test_runner/test_parse_environment_variable.cpp
// Copyright 2018 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "osrf_testing_tools_cpp/test/test_runner/test_parse_environment_variable.cpp", "license": "apache-2.0"... |
### File: test_osrf_testing_tools_cpp/CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(test_osrf_testing_tools_cpp)
# Default to C++11
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -W... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "test_osrf_testing_tools_cpp/CMakeLists.txt", "license": "apache-2.0", "size": 1449} |
### File: test_osrf_testing_tools_cpp/test/test_example_memory_tools.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "test_osrf_testing_tools_cpp/test/test_example_memory_tools.cpp", "license": "apache-2.0", "size": 412... |
### File: test_osrf_testing_tools_cpp/test/test_is_not_working.cpp
// Copyright 2015 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http:/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/osrf_testing_tools_cpp", "path": "test_osrf_testing_tools_cpp/test/test_is_not_working.cpp", "license": "apache-2.0", "size": 1191} |
### File: CMakeLists.txt
cmake_minimum_required(VERSION 3.10)
project(pybind11_vendor CXX)
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_vendor_package REQUIRED)
find_package(pybind11 QUIET)
ament_vendor(pybind11_vendor
SATISFIED ${pybind11_FOUND}
VCS_URL https://github.com/pybind/pybind11.git
VC... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pybind11_vendor", "path": "CMakeLists.txt", "license": "apache-2.0", "size": 413} |
### File: pybind11_vendor-extras.cmake
# Force the PYBIND11_PYTHON_VERSION to "3", which helps pybind11 find the
# correct version when both Python 2 and Python 3 libraries are installed.
set(PYBIND11_PYTHON_VERSION "3")
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "minhanghuang/pybind11_vendor", "path": "pybind11_vendor-extras.cmake", "license": "apache-2.0", "size": 182} |
### File: Makefile
release:
umask 022 && chmod -R a+rX . && python setup.py sdist bdist_wheel
# twine upload dist/*
test:
tox
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/pycodestyle", "path": "Makefile", "license": "mit", "size": 111} |
### File: docs/Makefile
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOP... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Makefile", "repo_name": "minhanghuang/pycodestyle", "path": "docs/Makefile", "license": "mit", "size": 5584} |
### File: docs/make.bat
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Batchfile", "repo_name": "minhanghuang/pycodestyle", "path": "docs/make.bat", "license": "mit", "size": 5106} |
### File: pycodestyle.py
#!/usr/bin/env python
# pycodestyle.py - Check Python source code formatting, according to
# PEP 8
#
# Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net>
# Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com>
# Copyright (C) 2014-2016 Ian Lee <ianlee1521@gmail.com>
#
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "pycodestyle.py", "license": "mit", "size": 103501} |
### File: setup.py
from setuptools import setup
def get_version():
with open('pycodestyle.py') as f:
for line in f:
if line.startswith('__version__'):
return eval(line.split('=')[-1])
def get_long_description():
descr = []
for fname in 'README.rst', 'CHANGES.txt':
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "setup.py", "license": "mit", "size": 1858} |
### File: testsuite/E10.py
#: E101 W191
for a in 'abc':
for b in 'xyz':
print a # indented with 8 spaces
print b # indented with 1 tab
#: E101 E122 W191 W191
if True:
pass
change_2_log = \
"""Change 2 by slamb@testclient on 2006/04/13 21:46:23
creation
"""
p4change = {
2: change_2_log,
}
class... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E10.py", "license": "mit", "size": 740} |
### File: testsuite/E11.py
#: E111
if x > 2:
print x
#: E111 E117
if True:
print
#: E112
if False:
print
#: E113
print
print
#: E114 E116
mimetype = 'application/x-directory'
# 'httpd/unix-directory'
create_date = False
#: E116 E116 E116
def start(self):
if True:
self.master.start()
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E11.py", "license": "mit", "size": 737} |
### File: testsuite/E12.py
#: E121
print "E121", (
"dent")
#: E122
print "E122", (
"dent")
#: E123
my_list = [
1, 2, 3,
4, 5, 6,
]
#: E124
print "E124", ("visual",
"indent_two"
)
#: E124
print "E124", ("visual",
"indent_five"
)
#: E124
a = (123,
)
#: E129 W503
i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E12.py", "license": "mit", "size": 7394} |
### File: testsuite/E12not.py
if (
x == (
3
) or y == 4):
pass
y = x == 2 \
or x == 3
if x == 2 \
or y > 1 \
or x == 3:
pass
if x == 2 \
or y > 1 \
or x == 3:
pass
#: W503
if (foo == bar
and baz == frop):
pass
#: W503
if (
foo ==... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E12not.py", "license": "mit", "size": 13378} |
### File: testsuite/E20.py
#: E201:1:6
spam( ham[1], {eggs: 2})
#: E201:1:10
spam(ham[ 1], {eggs: 2})
#: E201:1:15
spam(ham[1], { eggs: 2})
#: E201:1:6
spam( ham[1], {eggs: 2})
#: E201:1:10
spam(ham[ 1], {eggs: 2})
#: E201:1:15
spam(ham[1], { eggs: 2})
#: Okay
spam(ham[1], {eggs: 2})
#:
#: E202:1:23
spam(ham[1], {egg... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E20.py", "license": "mit", "size": 1157} |
### File: testsuite/E21.py
#: E211
spam (1)
#: E211 E211
dict ['key'] = list [index]
#: E211
dict['key'] ['subkey'] = list[index]
#: Okay
spam(1)
dict['key'] = list[index]
# This is not prohibited by PEP8, but avoid it.
class Foo (Bar, Baz):
pass
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E21.py", "license": "mit", "size": 226} |
### File: testsuite/E22.py
#: E221
a = 12 + 3
b = 4 + 5
#: E221 E221
x = 1
y = 2
long_variable = 3
#: E221 E221
x[0] = 1
x[1] = 2
long_variable = 3
#: E221 E221
x = f(x) + 1
y = long_variable + 2
z = x[0] + 3
#: E221:3:14
text = """
bar
foo %s""" % r... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E22.py", "license": "mit", "size": 2100} |
### File: testsuite/E23.py
#: E231
a = (1,2)
#: E231
a[b1,:]
#: E231
a = [{'a':''}]
#: Okay
a = (4,)
b = (5, )
c = {'text': text[5:]}
result = {
'key1': 'value',
'key2': 'value',
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E23.py", "license": "mit", "size": 163} |
### File: testsuite/E24.py
#: E241
a = (1, 2)
#: Okay
b = (1, 20)
#: E242
a = (1, 2) # tab before 2
#: Okay
b = (1, 20) # space before 20
#: E241 E241 E241
# issue 135
more_spaces = [a, b,
ef, +h,
c, -d]
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E24.py", "license": "mit", "size": 216} |
### File: testsuite/E25.py
#: E251 E251
def foo(bar = False):
'''Test function with an error in declaration'''
pass
#: E251
foo(bar= True)
#: E251
foo(bar =True)
#: E251 E251
foo(bar = True)
#: E251
y = bar(root= "sdasd")
#: E251:2:29
parser.add_argument('--long-option',
default=
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E25.py", "license": "mit", "size": 1214} |
### File: testsuite/E26.py
#: E261:1:5
pass # an inline comment
#: E262:1:12
x = x + 1 #Increment x
#: E262:1:12
x = x + 1 # Increment x
#: E262:1:12
x = y + 1 #: Increment x
#: E265:1:1
#Block comment
a = 1
#: E265:2:1
m = 42
#! This is important
mx = 42 - 42
#: E266:3:5 E266:6:5
def how_it_feel(r):
### This... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E26.py", "license": "mit", "size": 1370} |
### File: testsuite/E27.py
#: Okay
True and False
#: E271
True and False
#: E272
True and False
#: E271
if 1:
#: E273
True and False
#: E273 E274
True and False
#: E271
a and b
#: E271
1 and b
#: E271
a and 2
#: E271 E272
1 and b
#: E271 E272
a and 2
#: E272
this and False
#: E273
a and b
#: E274
a and b... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E27.py", "license": "mit", "size": 733} |
### File: testsuite/E30.py
#: E301:5:5
class X:
def a():
pass
def b():
pass
#: E301:6:5
class X:
def a():
pass
# comment
def b():
pass
#:
#: E302:2:1
"""Main module."""
def _main():
pass
#: E302:2:1
import sys
def get_sys_path():
return sys.path
#: E302:4:... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E30.py", "license": "mit", "size": 1996} |
### File: testsuite/E30not.py
#: Okay
class X:
pass
#: Okay
def foo():
pass
#: Okay
# -*- coding: utf-8 -*-
class X:
pass
#: Okay
# -*- coding: utf-8 -*-
def foo():
pass
#: Okay
class X:
def a():
pass
# comment
def b():
pass
# This is a
# ... multi-line comment
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E30not.py", "license": "mit", "size": 2752} |
### File: testsuite/E40.py
#: E401
import os, sys
#: Okay
import os
import sys
from subprocess import Popen, PIPE
from myclass import MyClass
from foo.bar.yourclass import YourClass
import myclass
import foo.bar.yourclass
#: Okay
__all__ = ['abc']
import foo
#: Okay
__version__ = "42"
import foo
#: Okay
__author__... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E40.py", "license": "mit", "size": 776} |
### File: testsuite/E50.py
#: E501
a = '12345678901234567890123456789012345678901234567890123456789012345678901234567890'
#: E501
a = '1234567890123456789012345678901234567890123456789012345678901234567890' or \
6
#: E501
a = 7 or \
'1234567890123456789012345678901234567890123456789012345678901234567890' or \
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E50.py", "license": "mit", "size": 3129} |
### File: testsuite/E70.py
#: E701:1:5
if a: a = False
#: E701:1:40
if not header or header[:6] != 'bytes=': return
#: E702:1:10
a = False; b = True
#: E702:1:17
import bdist_egg; bdist_egg.write_safety_flag(cmd.egg_info, safe)
#: E703:1:13
import shlex;
#: E702:1:9 E703:1:23
del a[:]; a.append(42);
#: E704:1:1
def f(x... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E70.py", "license": "mit", "size": 502} |
### File: testsuite/E71.py
#: E711
if res == None:
pass
#: E711
if res != None:
pass
#: E711
if None == res:
pass
#: E711
if None != res:
pass
#: E711
if res[1] == None:
pass
#: E711
if res[1] != None:
pass
#: E711
if None != res[1]:
pass
#: E711
if None == res[1]:
pass
#
#: E712
if res... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E71.py", "license": "mit", "size": 1245} |
### File: testsuite/E72.py
#: E721
if type(res) == type(42):
pass
#: E721
if type(res) != type(""):
pass
#: E721
import types
if res == types.IntType:
pass
#: E721
import types
if type(res) is not types.ListType:
pass
#: E721
assert type(res) == type(False) or type(res) == type(None)
#: E721
assert ty... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E72.py", "license": "mit", "size": 1284} |
### File: testsuite/E73.py
#: E731:1:1
f = lambda x: 2 * x
#: E731:1:1 E226:1:16
f = lambda x: 2*x
#: E731:2:5
while False:
this = lambda y, z: 2 * x
#: Okay
f = object()
f.method = lambda: 'Method'
f = {}
f['a'] = lambda x: x ** 2
f = []
f.append(lambda x: x ** 2)
lambda: 'no-op'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E73.py", "license": "mit", "size": 262} |
### File: testsuite/E90.py
#: E901
}
#: E901
= [x
#: E901 E101 W191
while True:
try:
pass
except:
print 'Whoops'
#: E122 E225 E251 E251
# Do not crash if code is invalid
if msg:
errmsg = msg % progress.get(cr_dbname))
def lasting(self, duration=300):
progress = self._progress.setdefault('foo', {}
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/E90.py", "license": "mit", "size": 436} |
### File: testsuite/W19.py
#: W191
if False:
print # indented with 1 tab
#:
#: W191
y = x == 2 \
or x == 3
#: E101 W191 W504
if (
x == (
3
) or
y == 4):
pass
#: E101 W191
if x == 2 \
or y > 1 \
or x == 3:
pass
#: E101 W191
if x == 2 \
or y > 1 \
or ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/W19.py", "license": "mit", "size": 2693} |
### File: testsuite/W29.py
#: Okay
# 情
#: W291:1:6
print
#: W293:2:1
class Foo(object):
bang = 12
#: W291:2:35
'''multiline
string with trailing whitespace'''
#: W291 W292 noeol
x = 1
#: W191 W292 noeol
if False:
pass # indented with tabs
#: W292:1:36 noeol
# This line doesn't have a linefeed
#: W292:... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/W29.py", "license": "mit", "size": 460} |
### File: testsuite/W39.py
#: W391:2:1
# The next line is blank
#: W391:3:1
# Two additional empty lines
#: W292:4:5 W293:3:1 W293:4:1 noeol
# The last lines contain space
#: Okay
'''there is nothing wrong
with a multiline string at EOF
that happens to have a blank line in it
'''
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/W39.py", "license": "mit", "size": 269} |
### File: testsuite/W60.py
#: W601
if a.has_key("b"):
print a
#: W602
raise DummyError, "Message"
#: W602
raise ValueError, "hello %s %s" % (1, 2)
#: Okay
raise type_, val, tb
raise Exception, Exception("f"), t
#: W603
if x <> 0:
x = 0
#: W604
val = `1 + 2`
#: W605:1:10
regex = '\.png$'
#: W605:2:1
regex = '''
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/W60.py", "license": "mit", "size": 1348} |
### File: testsuite/crlf.py
'''\
test
'''
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/crlf.py", "license": "mit", "size": 17} |
### File: testsuite/noqa.py
#: Okay
# silence E501
url = 'https://api.github.com/repos/sigmavirus24/Todo.txt-python/branches/master?client_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxx&?client_secret=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' # noqa
# silence E128
from functools import (partial, reduce, wraps, # noqa
cmp_to_key)... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/noqa.py", "license": "mit", "size": 408} |
### File: testsuite/python3.py
#!/usr/bin/env python3
from typing import ClassVar, List
# Annotated function (Issue #29)
def foo(x: int) -> int:
return x + 1
# Annotated variables #575
CONST: int = 42
match: int = 42
case: int = 42
class Class:
# Camel-caes
cls_var: ClassVar[str]
for_var: ClassVar... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/python3.py", "license": "mit", "size": 925} |
### File: testsuite/python310.py
#: Okay
var, var2 = 1, 2
match (var, var2):
case [2, 3]:
pass
case (1, 2):
pass
case _:
print("Default")
#: Okay
var = 0, 1, 2
match var:
case *_, 1, 2:
pass
case 0, *_, 2:
pass
case 0, 1, *_:
pass
case (*_, 1, ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/python310.py", "license": "mit", "size": 372} |
### File: testsuite/python311.py
#: Okay
try:
...
except* OSError as e:
pass
#: Okay
from typing import Generic
from typing import TypeVarTuple
Ts = TypeVarTuple('Ts')
class Shape(Generic[*Ts]):
pass
def f(*args: *Ts) -> None:
...
def g(x: Shape[*Ts]) -> Shape[*Ts]:
...
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/python311.py", "license": "mit", "size": 266} |
### File: testsuite/python35.py
#: E225
def bar(a, b)->int:
pass
#: Okay
def baz(a, b) -> int:
pass
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/python35.py", "license": "mit", "size": 76} |
### File: testsuite/python38.py
#: Okay
def f1(a, /, b):
pass
def f2(a, b, /):
pass
def f3(
a,
/,
b,
):
pass
lambda a, /: None
#: Okay
if x := 1:
print(x)
if m and (token := m.group(1)):
pass
stuff = [[y := f(x), x / y] for x in range(5)]
#: E225:1:5
if x:= 1:
pass
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/python38.py", "license": "mit", "size": 681} |
### File: testsuite/support.py
# -*- coding: utf-8 -*-
import os.path
import re
import sys
from pycodestyle import Checker, BaseReport, StandardReport, readlines
SELFTEST_REGEX = re.compile(r'\b(Okay|[EW]\d{3}):\s(.*)')
ROOT_DIR = os.path.dirname(os.path.dirname(__file__))
class PseudoFile(list):
"""Simplified ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/support.py", "license": "mit", "size": 8176} |
### File: testsuite/utf-8-bom.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
hello = 'こんにちわ'
# EOF
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/utf-8-bom.py", "license": "mit", "size": 83} |
### File: testsuite/utf-8.py
# -*- coding: utf-8 -*-
# Some random text with multi-byte characters (utf-8 encoded)
#
# Εδώ μάτσο κειμένων τη, τρόπο πιθανό διευθυντές ώρα μη. Νέων απλό π ροή
# κι, το επί δεδομένη καθορίζουν. Πάντως ζητήσεις περιβάλλοντος ένα με,
# ξέχασε αρπάζεις φαινόμενο όλη. Τρέξει εσφαλμένη χρησιμο... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/pycodestyle", "path": "testsuite/utf-8.py", "license": "mit", "size": 1815} |
### File: hmi/config/constants.py
import sys
import numpy as np
traffic_file_paths = {
"CarlaTown10": (
"limsim/networkFiles/CarlaTown10/Town10.net.xml",
"limsim/networkFiles/CarlaTown10/carlavtypes.rou.xml,limsim/networkFiles/CarlaTown10/Town10.rou.xml",
),
}
class MapOffset:
x_offset = 1... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/config/constants.py", "license": "apache-2.0", "size": 547} |
### File: hmi/dataGenerator/__init__.py
from .data_generator import GeneratorWidget
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/dataGenerator/__init__.py", "license": "apache-2.0", "size": 44} |
### File: hmi/dataGenerator/data_generator.py
"""
Copyright (C) 2023 by Autonomous Driving Group, Shanghai AI Laboratory.
Limited. All rights reserved.
Yan Guohang <yanguohang@pjlab.org.cn>
Pi Jiahao <pijiahao@pjlab.org.cn>
"""
import os
import sys
from config.constants import MapOffset
def set_env(depth: int):
#... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/dataGenerator/data_generator.py", "license": "apache-2.0", "size": 7463} |
### File: hmi/preview/__init__.py
from .mesh_widget import MeshWidget
from .preview_3d import PreviewWidget
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/preview/__init__.py", "license": "apache-2.0", "size": 74} |
### File: hmi/preview/mesh_widget.py
"""
Copyright (C) 2023 by Autonomous Driving Group, Shanghai AI Laboratory.
Limited. All rights reserved.
Yan Guohang <yanguohang@pjlab.org.cn>
"""
from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
import vtk
import sys
class MeshWidget(QVTKRenderWind... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/preview/mesh_widget.py", "license": "apache-2.0", "size": 1010} |
### File: hmi/preview/preview_3d.py
"""
Copyright (C) 2023 by Autonomous Driving Group, Shanghai AI Laboratory.
Limited. All rights reserved.
Yan Guohang <yanguohang@pjlab.org.cn>
"""
import os
import sys
def set_env(depth: int):
# Add project root to sys.path
current_file_path = os.path.abspath(__file__)
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/preview/preview_3d.py", "license": "apache-2.0", "size": 7604} |
### File: hmi/resources_rc.py
# Resource object code (Python 3)
# Created by: object code
# Created by: The Resource Compiler for Qt version 6.1.3
# WARNING! All changes made in this file will be lost!
from PySide6 import QtCore
qt_resource_data = b"\
\x00\x00\x9b\xc0\
\xff\
\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x01\x... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/resources_rc.py", "license": "apache-2.0", "size": 202973} |
### File: hmi/routeEdit/gui.py
"""
Copyright (C) 2023 by Autonomous Driving Group, Shanghai AI Laboratory.
Limited. All rights reserved.
Yan Guohang <yanguohang@pjlab.org.cn>
Luo Zhaotong <luozhaotong@pjlab.org.cn>
"""
import os
import sys
def set_env(depth: int):
# Add project root to sys.path
current_file_p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/routeEdit/gui.py", "license": "apache-2.0", "size": 15039} |
### File: hmi/run_oasim_gui.py
from PySide6 import QtCore
from PySide6.QtUiTools import loadUiType
from PySide6.QtWidgets import *
from PySide6.QtGui import *
from PySide6 import QtWidgets, QtGui
from vtkmodules.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor
from preview import MeshWidget, PreviewWidge... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "hmi/run_oasim_gui.py", "license": "apache-2.0", "size": 8322} |
### File: limsim/FixedSimExample.py
from simModel.fixedScene.model import Model
from trafficManager.traffic_manager import TrafficManager
import logger
# config a logger, set use_stdout=True to output log to terminal
log = logger.setup_app_level_logger(file_name="app_debug.log",
lev... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "limsim/FixedSimExample.py", "license": "apache-2.0", "size": 1255} |
### File: limsim/FixedSimInterReplayExample.py
from simModel.fixedScene import interReplay
from trafficManager.traffic_manager import TrafficManager
import logger
# config a logger, set use_stdout=True to output log to terminal
log = logger.setup_app_level_logger(file_name="app_debug.log",
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "limsim/FixedSimInterReplayExample.py", "license": "apache-2.0", "size": 899} |
### File: limsim/FixedSimReplayExample.py
from simModel.fixedScene.replay import ReplayModel
dataBase = 'fixedSceneTest.db'
frmodel = ReplayModel(dataBase)
while not frmodel.tpEnd:
frmodel.moveStep()
frmodel.gui.destroy()
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "limsim/FixedSimReplayExample.py", "license": "apache-2.0", "size": 188} |
### File: limsim/InterReplayExample.py
import logger
# config a logger, set use_stdout=True to output log to terminal
log = logger.setup_app_level_logger(file_name="app_debug.log",
level="DEBUG",
use_stdout=False)
from trafficManager.traffic_manag... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Python", "repo_name": "minhanghuang/OASim", "path": "limsim/InterReplayExample.py", "license": "apache-2.0", "size": 892} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.