repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
bazel
third_party/py/mock/tests/testmock.py
.py
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import ( callable, unittest2, inPy3k, is_instance, next ) import copy import pickle import sys import mock from mock import ( call, DEFAULT, pat...
1,352
42,396
bazel
third_party/py/mock/tests/testsentinel.py
.py
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import unittest2 from mock import sentinel, DEFAULT class SentinelTest(unittest2.TestCase): def testSentinels(self): self.assertEqual(sent...
34
989
bazel
third_party/py/mock/tests/testwith.py
.py
import sys if sys.version_info[:2] >= (2, 5): from tests._testwith import * else: from tests.support import unittest2 class TestWith(unittest2.TestCase): @unittest2.skip('tests using with statement skipped on Python 2.4') def testWith(self): pass if __name__ == '__main__': ...
17
340
bazel
third_party/py/mock/tests/testmagicmethods.py
.py
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import unittest2, inPy3k try: unicode except NameError: # Python 3 unicode = str long = int import inspect import sys from mock import M...
487
14,863
bazel
third_party/py/mock/tests/testcallable.py
.py
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import is_instance, unittest2, X, SomeClass from mock import ( Mock, MagicMock, NonCallableMagicMock, NonCallableMock, patch, create_autospec, ...
159
4,477
bazel
third_party/py/mock/tests/support_with.py
.py
from __future__ import with_statement import sys __all__ = ['nested', 'catch_warnings', 'examine_warnings'] try: from contextlib import nested except ImportError: from contextlib import contextmanager @contextmanager def nested(*managers): exits = [] vars = [] exc = (None, No...
94
2,972
bazel
third_party/py/mock/tests/support.py
.py
import sys info = sys.version_info if info[:3] >= (3, 2, 0): # for Python 3.2 ordinary unittest is fine import unittest as unittest2 else: import unittest2 try: callable = callable except NameError: def callable(obj): return hasattr(obj, '__call__') inPy3k = sys.version_info[0] == 3 wit...
42
702
bazel
third_party/py/mock/tests/testpatch.py
.py
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ import os import sys from tests import support from tests.support import unittest2, inPy3k, SomeClass, is_instance, callable from mock import ( NonCallableMock, Callab...
1,810
53,865
bazel
third_party/py/mock/tests/_testwith.py
.py
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from __future__ import with_statement from tests.support import unittest2, is_instance from mock import MagicMock, Mock, patch, sentinel, mock_open, call from tests.suppo...
182
6,077
bazel
third_party/py/mock/tests/testhelpers.py
.py
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import unittest2, inPy3k from mock import ( call, _Call, create_autospec, MagicMock, Mock, ANY, _CallList, patch, PropertyMock ) from datetime i...
941
27,419
bazel
tools/compliance/write_sbom.py
.py
# Copyright 2023 The Bazel Authors. All rights reserved. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
242
7,134
bazel
tools/compliance/packages_used_test.py
.py
# Copyright 2023 The Bazel Authors. All rights reserved. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
59
1,787
bazel
tools/python/pywrapper_test.py
.py
# pylint: disable=g-bad-file-header # Copyright 2019 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
178
6,150
bazel
tools/python/runfiles/runfiles.py
.py
# Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
24
997
bazel
tools/ctexplain/lib_test.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
94
3,565
bazel
tools/ctexplain/bazel_api_test.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
149
5,610
bazel
tools/ctexplain/bazel_api.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
181
5,991
bazel
tools/ctexplain/ctexplain_types.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
88
3,447
bazel
tools/ctexplain/types_test.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
69
2,423
bazel
tools/ctexplain/util.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
53
1,642
bazel
tools/ctexplain/lib.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
57
2,101
bazel
tools/ctexplain/ctexplain.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
173
5,187
bazel
tools/ctexplain/analyses/summary_test.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
45
1,658
bazel
tools/ctexplain/analyses/summary.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
70
2,516
bazel
tools/android/instrumentation_test_check.py
.py
# pylint: disable=g-direct-third-party-import # Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LI...
132
5,033
bazel
tools/android/instrumentation_test_check_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
74
2,852
bazel
tools/aquery_differ/aquery_differ_test.py
.py
# pylint: disable=g-direct-third-party-import # Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LI...
503
13,978
bazel
tools/aquery_differ/aquery_differ.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
314
11,418
bazel
tools/aquery_differ/resolvers/dep_set_resolver.py
.py
# Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
50
1,768
bazel
tools/aquery_differ/resolvers/path_fragment_resolver.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
46
1,528
bazel
tools/build_defs/proguard/wrapper.py
.py
# Copyright 2026 The Bazel Authors. All rights reserved. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
155
4,665
bazel
tools/build_defs/pkg/archive_test.py
.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
224
7,042
bazel
tools/build_defs/pkg/path_test.py
.py
# Copyright 2016 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
91
2,749
bazel
tools/build_defs/pkg/build_tar.py
.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
122
3,478
bazel
tools/build_defs/pkg/archive.py
.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
228
7,410
bazel
tools/build_defs/hash/sha256.py
.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
38
1,335
bazel
tools/jdk/proguard_allowlister_test.py
.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
73
2,767
bazel
tools/jdk/proguard_allowlister.py
.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
105
3,830
bazel
scripts/generate_fish_completion.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
328
11,604
bazel
scripts/packages/debian/generate_changelog.py
.py
#!/usr/bin/env python3 # pylint: disable=g-bad-file-header # Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.or...
45
1,603
bazel
scripts/docs/clr_converter_test.py
.py
# Copyright 2026 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
233
7,212
bazel
scripts/docs/docs2mdx.py
.py
# Lint as: python3 # pylint: disable=g-direct-third-party-import # Copyright 2026 The Bazel Authors. All rights reserved. # # 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.apa...
291
8,399
bazel
scripts/docs/create_release_docs.py
.py
# Lint as: python3 # pylint: disable=g-direct-third-party-import # Copyright 2022 The Bazel Authors. All rights reserved. # # 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.apa...
202
6,436
bazel
scripts/docs/rewriter_test.py
.py
# Copyright 2022 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
63
2,140
bazel
scripts/docs/clr_converter.py
.py
# Copyright 2026 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
693
19,520
bazel
scripts/docs/rewriter.py
.py
# Lint as: python3 # pylint: disable=g-direct-third-party-import # Copyright 2022 The Bazel Authors. All rights reserved. # # 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.apa...
145
4,456
bazel
scripts/release/relnotes.py
.py
# Copyright 2022 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
245
8,046
bazel
examples/py_native/fail.py
.py
"""A tiny example binary for the native Python rules of Bazel.""" import unittest from examples.py_native.lib import GetNumber class TestGetNumber(unittest.TestCase): def test_fail(self): self.assertEqual(GetNumber(), 0) if __name__ == '__main__': unittest.main()
14
277
bazel
examples/py_native/lib.py
.py
"""A tiny example binary for the native Python rules of Bazel.""" def GetNumber(): return 42
6
97
bazel
examples/py_native/bin.py
.py
# pylint: disable=superfluous-parens """A tiny example binary for the native Python rules of Bazel.""" from examples.py_native.lib import GetNumber from fib import Fib print("The number is %d" % GetNumber()) print("Fib(5) == %d" % Fib(5))
8
240
bazel
examples/py_native/test.py
.py
"""A tiny example binary for the native Python rules of Bazel.""" import unittest from examples.py_native.lib import GetNumber from fib import Fib class TestGetNumber(unittest.TestCase): def test_ok(self): self.assertEqual(GetNumber(), 42) def test_fib(self): self.assertEqual(Fib(5), 8) if __name__ ==...
18
351
bazel
examples/py_native/fibonacci/fib.py
.py
"""An example binary to test the imports attribute of native Python rules.""" def Fib(n): if n == 0 or n == 1: return 1 else: return Fib(n-1) + Fib(n-2)
9
167
bazel
examples/py/runfile.py
.py
"""Example for using runfiles with Python.""" import pathlib from python.runfiles import runfiles SOME_FILE = pathlib.Path("examples/runfile.txt") r = runfiles.Create() root = r.CurrentRepository() if not root: root = "_main" realPathToSomeFile = r.Rlocation(str(root / SOME_FILE)) print("The content of the runfi...
18
396
bazel
examples/py/lib.py
.py
def Fib(n): if n == 0 or n == 1: return 1 else: return Fib(n-1) + Fib(n-2)
6
87
bazel
examples/py/bin.py
.py
from examples.py import lib print("Fib(5)=%d" % lib.Fib(5))
4
61
bazel
src/create_embedded_tools_lib.py
.py
# pylint: disable=g-bad-file-header # Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
95
3,763
bazel
src/create_embedded_tools.py
.py
# pylint: disable=g-direct-third-party-import # pylint: disable=g-bad-file-header # Copyright 2017 The Bazel Authors. All rights reserved. # # 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 # # ...
152
5,936
bazel
src/tools/singlejar/data/log4j2_plugins_gen.py
.py
# Copyright 2024 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
219
6,770
bazel
src/test/shell/unittest_test.py
.py
# Copyright 2020 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
1,034
26,898
bazel
src/test/shell/bazel/testing_server.py
.py
# Copyright 2015 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
189
5,399
bazel
src/test/shell/bazel/remote/uds_proxy.py
.py
# Copyright 2019 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
64
1,896
bazel
src/test/py/bazel/genrule_test.py
.py
# Copyright 2019 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
204
6,503
bazel
src/test/py/bazel/launcher_test.py
.py
# pylint: disable=g-bad-file-header # Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
987
34,092
bazel
src/test/py/bazel/bazel_windows_cpp_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
1,359
47,071
bazel
src/test/py/bazel/bazel_windows_symlinks_test.py
.py
# Copyright 2019 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
65
1,985
bazel
src/test/py/bazel/bazel_tools_proto_test.py
.py
# pylint: disable=g-bad-file-header # Copyright 2026 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
84
2,488
bazel
src/test/py/bazel/runfiles_test.py
.py
# pylint: disable=g-bad-file-header # Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
584
21,557
bazel
src/test/py/bazel/test_wrapper_test.py
.py
# Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
800
26,596
bazel
src/test/py/bazel/bazel_server_mode_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
46
1,388
bazel
src/test/py/bazel/cc_import_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
252
8,219
bazel
src/test/py/bazel/bazel_windows_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
682
19,422
bazel
src/test/py/bazel/windows_remote_test.py
.py
# pylint: disable=g-bad-file-header # pylint: disable=superfluous-parens # Copyright 2017 The Bazel Authors. All rights reserved. # # 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:/...
259
8,459
bazel
src/test/py/bazel/py_test.py
.py
# Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
379
11,392
bazel
src/test/py/bazel/test_base.py
.py
# pylint: disable=g-bad-file-header # pylint: disable=superfluous-parens # Copyright 2017 The Bazel Authors. All rights reserved. # # 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:/...
658
22,232
bazel
src/test/py/bazel/bazel_clean_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
112
3,865
bazel
src/test/py/bazel/bazel_external_repository_test.py
.py
# pylint: disable=g-bad-file-header # Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
795
25,661
bazel
src/test/py/bazel/first_time_use_test.py
.py
# Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
109
3,753
bazel
src/test/py/bazel/query_test.py
.py
# pylint: disable=g-bad-file-header # Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
75
2,727
bazel
src/test/py/bazel/runfiles_sandboxed_test.py
.py
# pylint: disable=g-bad-file-header # Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 ...
124
4,946
bazel
src/test/py/bazel/action_temp_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
267
9,622
bazel
src/test/py/bazel/options_test.py
.py
# Copyright 2022 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
321
8,443
bazel
src/test/py/bazel/remote/cache_decompression_test.py
.py
# Copyright 2017 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
144
4,514
bazel
src/test/py/bazel/bzlmod/external_repo_completion_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2023 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
305
11,200
bazel
src/test/py/bazel/bzlmod/bazel_fetch_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2023 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
463
16,263
bazel
src/test/py/bazel/bzlmod/remote_repo_contents_cache_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2025 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
2,710
104,828
bazel
src/test/py/bazel/bzlmod/bazel_lockfile_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2023 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
3,417
124,554
bazel
src/test/py/bazel/bzlmod/bzlmod_credentials_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2023 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
167
5,291
bazel
src/test/py/bazel/bzlmod/bazel_yanked_versions_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2023 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
534
16,631
bazel
src/test/py/bazel/bzlmod/mod_command_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2022 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
1,699
54,742
bazel
src/test/py/bazel/bzlmod/bazel_module_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2021 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
1,487
49,455
bazel
src/test/py/bazel/bzlmod/bazel_overrides_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2023 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
967
29,949
bazel
src/test/py/bazel/bzlmod/bazel_repo_mapping_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2023 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
464
16,570
bazel
src/test/py/bazel/bzlmod/bzlmod_query_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2022 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
382
12,805
bazel
src/test/py/bazel/bzlmod/bazel_vendor_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2024 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
940
32,963
bazel
src/test/py/bazel/bzlmod/repo_contents_cache_test.py
.py
# pylint: disable=g-backslash-continuation # Copyright 2025 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICEN...
784
28,353
bazel
src/test/py/bazel/bzlmod/test_utils.py
.py
# pylint: disable=invalid-name # pylint: disable=g-long-ternary # Copyright 2021 The Bazel Authors. All rights reserved. # # 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...
496
15,520
bazel
src/test/py/bazel/testdata/runfiles_test/foo/foo.py
.py
# Copyright 2018 The Bazel Authors. All rights reserved. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
74
2,135
bazel
src/test/py/bazel/testdata/bazel_external_repository_test/hello-1.0.0/hello.py
.py
"""Returns the constant 'hello world'.""" def hello(): return "hello world" if __name__ == "__main__": print(hello())
10
126
pdm
install-pdm.py
.py
from __future__ import annotations import argparse import dataclasses import io import json import os import platform import shutil import site import subprocess import sys import urllib.request from collections.abc import Sequence from pathlib import Path from tempfile import TemporaryDirectory if sys.version_info <...
464
14,850
pdm
tasks/complete.py
.py
from pathlib import Path from argcomplete.shell_integration import shellcode COMPLETIONS = Path(__file__).parent.parent / "src/pdm/cli/completions" def main(): for shell, suffix, title in ( ("bash", "bash", "BASH"), ("zsh", "zsh", "ZSH"), ("fish", "fish", "FISH"), ("powershell", ...
21
546