polyglot-piranha 0.3.25__cp311-cp311-manylinux_2_34_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ from .polyglot_piranha import *
2
+
3
+ __doc__ = polyglot_piranha.__doc__
4
+ if hasattr(polyglot_piranha, "__all__"):
5
+ __all__ = polyglot_piranha.__all__
@@ -0,0 +1,321 @@
1
+ # Copyright (c) 2023 Uber Technologies, Inc.
2
+ #
3
+ # <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
4
+ # except in compliance with the License. You may obtain a copy of the License at
5
+ # <p>http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # <p>Unless required by applicable law or agreed to in writing, software distributed under the
8
+ # License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
9
+ # express or implied. See the License for the specific language governing permissions and
10
+ # limitations under the License.
11
+
12
+ from __future__ import annotations
13
+ from typing import List, Optional, Literal
14
+
15
+ # Languages that Piranha supports (see ./src/models/language.rs)
16
+ PiranhaLanguage = Literal["java", "kt", "kotlin", "go", "py", "swift", "ts", "tsx", "thrift", "strings", "scm", "scala", "rb"]
17
+
18
+
19
+ def execute_piranha(piranha_argument: PiranhaArguments) -> list[PiranhaOutputSummary]:
20
+ """
21
+ Executes piranha for the given `piranha_arguments` and returns `PiranhaOutputSummary` for each file analyzed by Piranha
22
+ Parameters
23
+ ------------
24
+ piranha_arguments: Piranha Arguments
25
+ Configurations for piranha
26
+ Returns
27
+ ------------
28
+ List of `PiranhaOutPutSummary`
29
+ """
30
+ ...
31
+
32
+ class PiranhaArguments:
33
+ """
34
+ A class to capture Piranha's configurations
35
+ """
36
+
37
+ def __init__(
38
+ self,
39
+ language: PiranhaLanguage,
40
+ paths_to_codebase: Optional[List[str]] = None,
41
+ include: Optional[List[str]] = None,
42
+ exclude: Optional[List[str]] = None,
43
+ substitutions: Optional[dict[str, str]] = None,
44
+ path_to_configurations: Optional[str] = None,
45
+ rule_graph: Optional[RuleGraph] = None,
46
+ code_snippet: Optional[str] = None,
47
+ dry_run: Optional[bool] = None,
48
+ cleanup_comments: Optional[bool] = None,
49
+ cleanup_comments_buffer: Optional[int] = None,
50
+ number_of_ancestors_in_parent_scope: Optional[int] = None,
51
+ delete_consecutive_new_lines: Optional[bool] = None,
52
+ global_tag_prefix: Optional[str] = "GLOBAL_TAG",
53
+ delete_file_if_empty: Optional[bool] = None,
54
+ path_to_output: Optional[str] = None,
55
+ allow_dirty_ast: Optional[bool] = None,
56
+ should_validate: Optional[bool] = None,
57
+ experiment_dyn: Optional[bool] = None,
58
+ ):
59
+ """
60
+ Constructs `PiranhaArguments`
61
+
62
+ Parameters
63
+ ------------
64
+ language: PiranhaLanguage
65
+ the target language
66
+ paths_to_codebase: List[str]
67
+ Paths to source code folder or file
68
+ keyword arguments: _
69
+ substitutions (dict): Substitutions to instantiate the initial set of rules
70
+ path_to_configurations (str): Directory containing the configuration files - `piranha_arguments.toml`, `rules.toml`, and `edges.toml`
71
+ rule_graph (RuleGraph): The rule graph constructed via RuleGraph DSL
72
+ code_snippet (str): The input code snippet to transform
73
+ dry_run (bool): Disables in-place rewriting of code
74
+ cleanup_comments (bool): Enables deletion of associated comments
75
+ cleanup_comments_buffer (int): The number of lines to consider for cleaning up the comments
76
+ number_of_ancestors_in_parent_scope (int): The number of ancestors considered when PARENT rules
77
+ delete_consecutive_new_lines (bool): Replaces consecutive \ns with a \n
78
+ global_tag_prefix (str): the prefix for global tags
79
+ delete_file_if_empty (bool): User option that determines whether an empty file will be deleted
80
+ path_to_output (str): Path to the output json file
81
+ allow_dirty_ast (bool): Allows syntax errors in the input source code
82
+ """
83
+ ...
84
+
85
+ class PiranhaOutputSummary:
86
+ """
87
+ A class to represent Piranha's output
88
+
89
+ Attributes
90
+ ----------
91
+ path: path to the file
92
+ content: content of the file after all the rewrites
93
+ matches: All the occurrences of "match-only" rules
94
+ rewrites: All the applied edits
95
+ """
96
+
97
+ path: str
98
+ "path to the file"
99
+
100
+ original_content: str
101
+ "Original content of the file before any rewrites"
102
+
103
+ content: str
104
+ "Final content of the file after all the rewrites"
105
+
106
+ matches: list[tuple[str, Match]]
107
+ 'All the occurrences of "match-only" rules'
108
+
109
+ rewrites: list[Edit]
110
+ "All the applied edits"
111
+
112
+ class Edit:
113
+ """
114
+ A class to represent an edit performed by Piranha
115
+
116
+ Attributes
117
+ ----------
118
+ p_match: The match representing the target site of the edit
119
+ replacement_string: The string to replace the substring encompassed by the match
120
+ matched_rule: The rule used for creating this match-replace
121
+ """
122
+
123
+ p_match: Match
124
+ "The match representing the target site of the edit"
125
+
126
+ matched_rule: str
127
+ "The rule used for creating this match-replace"
128
+
129
+ replacement_string: str
130
+ "The string to replace the substring encompassed by the match"
131
+
132
+ class Match:
133
+ """
134
+ A class to represent a match
135
+
136
+ Attributes
137
+ ----------
138
+ matched_sting: Code snippet that matched
139
+ range: Range of the entire AST node captured by the match
140
+ matches: The mapping between tags and string representation of the AST captured
141
+ """
142
+
143
+ matched_string: str
144
+ "Code snippet that matched"
145
+
146
+ range: Range
147
+ "Range of the entire AST node captured by the match"
148
+
149
+ matches: dict[str, str]
150
+ "The mapping between tags and string representation of the AST captured"
151
+ ""
152
+
153
+ class Range:
154
+ """A range of positions in a multi-line text document,
155
+ both in terms of bytes and of rows and columns.
156
+ """
157
+
158
+ start_byte: int
159
+ end_byte: int
160
+ start_point: Point
161
+ end_point: Point
162
+
163
+ class Point:
164
+ row: int
165
+ column: int
166
+
167
+ class Filter:
168
+ """A class to capture filters of a Piranha Rule"""
169
+
170
+ enclosing_node: TSQuery
171
+ "AST patterns that some ancestor node of the primary match should comply"
172
+ not_contains: list[TSQuery]
173
+ "AST patterns that SHOULD NOT match any subtree of node matching `enclosing_node` pattern"
174
+ contains: TSQuery
175
+ "AST pattern that SHOULD match subtrees of `enclosing_node`. " "Number of matches should be within the range of `at_least` and `at_most`."
176
+ at_least: int
177
+ "The minimum number of times the contains query should match in the enclosing node"
178
+ at_most: int
179
+ "The maximum number of times the contains query should match in the enclosing node"
180
+ child_count: int
181
+ "Number of named children under the primary matched node"
182
+ sibling_count: int
183
+ "Number of named siblings of the primary matched node"
184
+ def __init__(
185
+ self,
186
+ enclosing_node: Optional[str] = None,
187
+ not_enclosing_node: Optional[str] = None,
188
+ not_contains: list[str] = [],
189
+ contains: Optional[str] = None,
190
+ at_least: int = 1,
191
+ at_most: int = 4294967295, # u32::MAX
192
+ child_count: int = 4294967295, # u32::MAX
193
+ sibling_count: int = 4294967295, # u32::MAX
194
+ ):
195
+ """
196
+ Constructs `Filter`
197
+
198
+ Parameters
199
+ ------------
200
+ enclosing_node: str
201
+ AST patterns that some ancestor node of the primary match should comply
202
+ not_contains: list[str]
203
+ AST patterns that should not match any subtree of node matching `enclosing_node` pattern
204
+ """
205
+ ...
206
+
207
+ class Rule:
208
+ """A class to capture Piranha Rule"""
209
+
210
+ name: str
211
+ "Name of the rule"
212
+ query: TSQuery
213
+ "Tree-sitter query as string"
214
+ replace_node: str
215
+ "The tag corresponding to the node to be replaced"
216
+ replace_node_idx: str
217
+ "The i'th child of node corresponding to the replace_node tag will be replaced"
218
+ replace: str
219
+ "Replacement pattern"
220
+ groups: set[str]
221
+ "Group(s) to which the rule belongs"
222
+ holes: set[str]
223
+ "Holes that need to be filled, in order to instantiate a rule"
224
+ filters: set[Filter]
225
+ "Filters to test before applying a rule"
226
+ is_seed_rule: bool
227
+ "Marks a rule as a seed rule"
228
+
229
+ def __init__(
230
+ self,
231
+ name: str,
232
+ query: Optional[str] = None,
233
+ replace_node: Optional[str] = None,
234
+ replace: Optional[str] = None,
235
+ groups: set[str] = set(),
236
+ holes: set[str] = set(),
237
+ filters: set[Filter] = set(),
238
+ is_seed_rule: bool = True,
239
+ ):
240
+ """
241
+ Constructs `Rule`
242
+
243
+ Parameters
244
+ ------------
245
+ name: str
246
+ Name of the rule
247
+ query: str
248
+ Tree-sitter query as string
249
+ replace_node: str
250
+ The tag corresponding to the node to be replaced
251
+ replace: str
252
+ Replacement pattern
253
+ groups: set[str]
254
+ Group(s) to which the rule belongs
255
+ holes: set[str]
256
+ Holes that need to be filled, in order to instantiate a rule
257
+ filters: set[Filter]
258
+ Filters to test before applying a rule
259
+ is_seed_rule: bool
260
+ Marks a rule as a seed rule
261
+ """
262
+ ...
263
+
264
+ class OutgoingEdges:
265
+ frm: str
266
+ "The source rule or group of rules"
267
+ to: list[str]
268
+ "The target edges or groups of edges"
269
+ scope: str
270
+ "The scope label for the edge"
271
+
272
+ def __init__(
273
+ self,
274
+ frm: str,
275
+ to: list[str],
276
+ scope: str,
277
+ ):
278
+ """
279
+ Constructs `OutgoingEdge`
280
+
281
+ Parameters
282
+ ------------
283
+ frm: str
284
+ The source rule or group of rules
285
+ to: list[str]
286
+ The target edges or groups of edges
287
+ scope: str
288
+ The scope label for the edge
289
+ """
290
+ ...
291
+
292
+ class RuleGraph:
293
+ rules: list[Rule]
294
+ "The rules in the graph"
295
+ edges: list[OutgoingEdges]
296
+ "The edges in the graph"
297
+ graph: dict[str, list[tuple[str, str]]]
298
+ "The graph itself (as an adjacency list)"
299
+
300
+ def __init__(
301
+ self,
302
+ rules: list[Rule],
303
+ edges: list[OutgoingEdges],
304
+ ):
305
+ """
306
+ Constructs `OutgoingEdge`
307
+
308
+ Parameters
309
+ ------------
310
+ rules: list[Rule]
311
+ The rules in the graph
312
+ edges: list[OutgoingEdges]
313
+ The edges in the graph
314
+ """
315
+ ...
316
+
317
+ class TSQuery:
318
+ "Captures a Tree sitter query"
319
+ def query(self):
320
+ """The query"""
321
+ ...
File without changes
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.3
2
+ Name: polyglot_piranha
3
+ Version: 0.3.25
4
+ License-File: LICENSE
5
+ License-File: NOTICE
6
+ Summary: Polyglot Piranha is a library for performing structural find and replace with deep cleanup.
7
+ Keywords: refactoring,code update,structural find-replace,structural search and replace,structural search
8
+ Author: Uber Technologies Inc.
9
+ License: Apache-2.0
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
12
+ Project-URL: homepage, https://github.com/uber/piranha
13
+ Project-URL: documentation, https://github.com/uber/piranha
14
+ Project-URL: repository, https://github.com/uber/piranha
15
+
16
+ # Piranha
17
+
18
+ [![Join the chat at https://gitter.im/uber/piranha](https://badges.gitter.im/uber/piranha.svg)](https://gitter.im/uber/piranha?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
19
+
20
+ Feature flags are commonly used to enable gradual rollout or experiment with new features. In a few cases, even after the purpose of the flag is accomplished, the code pertaining to the feature flag is not removed. We refer to such flags as stale flags. The presence of code pertaining to stale flags can have the following drawbacks:
21
+ - Unnecessary code clutter increases the overall complexity w.r.t maintenance resulting in reduced developer productivity
22
+ - The flags can interfere with other experimental flags (e.g., due to nesting under a flag that is always false)
23
+ - Presence of unused code in the source as well as the binary
24
+ - Stale flags can also cause bugs
25
+
26
+ Piranha is a tool to automatically refactor code related to stale flags. At a higher level, the input to the tool is the name of the flag and the expected behavior, after specifying a list of APIs related to flags in a properties file. Piranha will use these inputs to automatically refactor the code according to the expected behavior.
27
+
28
+ This repository contains four independent versions of Piranha, one for each of the four supported languages: Java, JavaScript, Objective-C and Swift. **It also contains a redesigned variant of Piranha (as of May 2022) that is a common refactoring tool to support multiple languages and feature flag APIs. If interested in this polyglot variant, goto [Polyglot Piranha](POLYGLOT_README.md)**.
29
+
30
+ To use/build each version, look under the corresponding [lang]/ directory and follow instructions in the corresponding [lang]/README.md file. Make sure to cd into that directory to build any related code following the instructions in the README.
31
+
32
+ - [PiranhaJava](legacy/java/README.md)
33
+ - [PiranhaJS](legacy/javascript/README.md)
34
+ - [PiranhaObjC](legacy/objc/README.md)
35
+ - [PiranhaSwift](legacy/swift/README.md)
36
+
37
+ A few additional links on Piranha:
38
+
39
+ - Research paper published at [PLDI 2024](https://dl.acm.org/doi/10.1145/3656429) on PolyglotPiranha.
40
+ - A technical [report](report.pdf) detailing our experiences with using Piranha at Uber.
41
+ - A [blogpost](https://eng.uber.com/piranha/) presenting more information on Piranha.
42
+ - 6 minute [video](https://www.youtube.com/watch?v=V5XirDs6LX8&feature=emb_logo) overview of Piranha.
43
+
44
+ ## Support
45
+
46
+ If you have any questions on how to use Piranha, please feel free to reach out to us on the [gitter channel](https://gitter.im/uber/piranha?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge). For bugs and enhancement requests, [open a GitHub issue](https://github.com/uber/piranha/issues).
47
+
48
+ ## Contributors
49
+
50
+ We'd love for you to contribute to Piranha! Please note that once
51
+ you create a pull request, you will be asked to sign our [Uber Contributor License Agreement](https://cla-assistant.io/uber/piranha).
52
+
53
+ We are also looking for contributions to extend Piranha to other languages (C++, C#, Kotlin).
54
+
55
+ ## License
56
+ Piranha is licensed under the Apache 2.0 license. See the LICENSE file for more information.
57
+
@@ -0,0 +1,9 @@
1
+ polyglot_piranha-0.3.25.dist-info/METADATA,sha256=sPaY71g745SmD4LbGrHOlb1ngGLtpjN7LfsrQtBYcIc,3820
2
+ polyglot_piranha-0.3.25.dist-info/WHEEL,sha256=uYO6Eqpfu-1wLR_IDvvsoytYzZo1rzxbEwkaoMlPxSs,109
3
+ polyglot_piranha-0.3.25.dist-info/license_files/LICENSE,sha256=7qqytxojDvLpt8CphcCVvEQilegiJ0x_oDkwHJU-1z4,11359
4
+ polyglot_piranha-0.3.25.dist-info/license_files/NOTICE,sha256=9bEJKCdL0MABjEknpMHXbYBZSkGVGRXYcSxSXS293X0,147
5
+ polyglot_piranha/__init__.py,sha256=pghVgChf0-NgAG_zd7CzKtvFuBDxg5Wh-GcHx2PoTzg,147
6
+ polyglot_piranha/__init__.pyi,sha256=NCT9ACz8M9CJqQGEisGT5AybulsHfl-_z_I-QQ6iMQw,10475
7
+ polyglot_piranha/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ polyglot_piranha/polyglot_piranha.cpython-311-aarch64-linux-gnu.so,sha256=_28kTCiKjgyEeBhXkVnQMMYnQEiYmf5WuXkz_5uuT90,23995576
9
+ polyglot_piranha-0.3.25.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.7.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp311-cp311-manylinux_2_34_aarch64
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner].
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,5 @@
1
+ [Piranha]
2
+ Copyright (c) 2018 Uber Technologies, Inc.
3
+
4
+ This product includes software developed at
5
+ Uber Technologies, Inc. (http://www.uber.com/).