Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyre Configurationless migration for] [batch:82/112] [shard:6/N] #818

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/code_navigation_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains logic for querying a socket connection to a
Pyre code-navigation daemon. See ./daemon_launcher.py for how to
Expand Down
2 changes: 2 additions & 0 deletions api/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains logic for a Python API to query Pyre
daemons. This API is based on shelling out to the `pyre query`
Expand Down
2 changes: 2 additions & 0 deletions api/daemon_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides a Python API for starting and stopping Pyre daemons
(using the new code navigation backend).
Expand Down
2 changes: 2 additions & 0 deletions api/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains logic for transforming the raw output of Pyre queries
into structured Pythonic data structure.
Expand Down
2 changes: 2 additions & 0 deletions api/tests/connection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


import subprocess
import unittest
Expand Down
2 changes: 2 additions & 0 deletions api/tests/daemon_launcher_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import unittest
from pathlib import Path
from typing import Union
Expand Down
2 changes: 2 additions & 0 deletions api/tests/query_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import unittest
from unittest.mock import call, MagicMock, patch

Expand Down
2 changes: 2 additions & 0 deletions client/backend_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module defines shared logic for data sent to the Pyre backend
as a json arguments file when launching a new backend process.
Expand Down
2 changes: 2 additions & 0 deletions client/background_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module defines a background task base class, that can be used
to start an async background task (which is basically a forked async
Expand Down
2 changes: 2 additions & 0 deletions client/command_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides a series of dataclasses and enums
that describe command-line arguments for invoking Pyre.
Expand Down
2 changes: 2 additions & 0 deletions client/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
The `client.commands` namespace of Pyre contains the entrypoints
for all of the subcommands of pyre such as `pyre check` and
Expand Down
2 changes: 2 additions & 0 deletions client/commands/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Entrypoint for the `pyre analyze` command, which runs Pysa analysis.
"""
Expand Down
2 changes: 2 additions & 0 deletions client/commands/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the logic for the `pyre check` command, which runs a
single-shot type check (as opposed to `pyre incremental`, which starts a
Expand Down
2 changes: 2 additions & 0 deletions client/commands/code_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This command contains the main logic for the client connecting language servers
and Pyre's code navigation server. It mainly ferries LSP requests back and forth between
Expand Down
2 changes: 2 additions & 0 deletions client/commands/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides some utility code for handling exit status and
uncaught exceptions in Pyre commands.
Expand Down
2 changes: 2 additions & 0 deletions client/commands/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the logic for computing function-level coverage in Pyre.

Expand Down
2 changes: 2 additions & 0 deletions client/commands/daemon_querier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
The request handler provides an interface and implementation for LSP related
queries (such as hover & definition). The current implementation of the request
Expand Down
2 changes: 2 additions & 0 deletions client/commands/daemon_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
The daemon query module contains APIs for sending requests to the Pyre daemon.
The responsibility of this layer is to serialize queries and send them over the connection,
Expand Down
2 changes: 2 additions & 0 deletions client/commands/error_code_to_link_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


error_code_to_fragment: dict[int, str] = {
0: "0-unused-ignore",
Expand Down
2 changes: 2 additions & 0 deletions client/commands/expression_level_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides logic for computing expression-level coverage in
Pyre. Expression-level coverage queries the backend and actually traveses
Expand Down
2 changes: 2 additions & 0 deletions client/commands/find_symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains logic for a Python-based implementation of
gathering document symbols for a language server. We traverse the
Expand Down
2 changes: 2 additions & 0 deletions client/commands/incremental.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the logic for the `pyre incremental` command,
which is what is also run when `pyre` is invoked with no subcommand.
Expand Down
2 changes: 2 additions & 0 deletions client/commands/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains the logic for `pyre infer`.

Expand Down
2 changes: 2 additions & 0 deletions client/commands/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Logic for the `pyre info` command, which prints information about
the current pyre environment (e.g. socket path, log locations).
Expand Down
2 changes: 2 additions & 0 deletions client/commands/initialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module handles the initialization-related code for the LSP server, including the
LSP handshake and the policy of starting a Pyre server.
Expand Down
2 changes: 2 additions & 0 deletions client/commands/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains logic for `pyre init`, which interactively
helps a user create a new pyre configuration.
Expand Down
2 changes: 2 additions & 0 deletions client/commands/initialize_pysa.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the logic for the `pyre init-pysa` command, which:
- generate a pyre configuration if necessary
Expand Down
2 changes: 2 additions & 0 deletions client/commands/kill.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the logic for `pyre kill`. Normally one would cleanly
shut down a pyre daemon using `pyre stop`, but if the daemon is not
Expand Down
2 changes: 2 additions & 0 deletions client/commands/launch_and_subscribe_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains an abstract daemon class that manages a Pyre process.

Expand Down
2 changes: 2 additions & 0 deletions client/commands/libcst_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import logging
from collections import defaultdict
from pathlib import Path
Expand Down
2 changes: 2 additions & 0 deletions client/commands/no_daemon_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module represents an API for all no-daemon queries that are invoked
on the command line. No-daemon in this context means that no running instance of a Pyre
Expand Down
2 changes: 2 additions & 0 deletions client/commands/persistent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module represents the top level class and entry point for the LSP client
to interact with the Pyre Server. The LSP client will invoke the top level
Expand Down
2 changes: 2 additions & 0 deletions client/commands/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Logic for the `pyre profile` command, which (depending on the
`--profile-output` flag) will summarize or display the raw logs
Expand Down
2 changes: 2 additions & 0 deletions client/commands/pyre_language_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module is responsible for handling requests from the VScode language server and generating an appropriate response.

Expand Down
2 changes: 2 additions & 0 deletions client/commands/pyre_server_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module describes all of the flags that control behavior of a Pyre
language server - for example, the location of the backend binary and
Expand Down
2 changes: 2 additions & 0 deletions client/commands/pysa_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


"""
This is an implementation of Pysa's language server. It is a refactored
Expand Down
2 changes: 2 additions & 0 deletions client/commands/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module represents a very high level API for
all the processing that will be done by the Pyre server when a
Expand Down
2 changes: 2 additions & 0 deletions client/commands/query_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides a raw, untyped representation for daemon query
responses which handles unwrapping the outer layer of responses sent
Expand Down
2 changes: 2 additions & 0 deletions client/commands/rage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the logic for the `pyre rage` command, which collects
information that may be useful for debugging problems with Pyre (e.g. logs
Expand Down
2 changes: 2 additions & 0 deletions client/commands/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the entrypoint for `pyre report`, a command to
collect data about code and how well Pyre can understand its types.
Expand Down
2 changes: 2 additions & 0 deletions client/commands/report_any_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the entrypoint for `pyre report-any-expressions`, a command
to collect data about how often the Pyre type check for an expression will have
Expand Down
2 changes: 2 additions & 0 deletions client/commands/restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides the logic for the `pyre restart` command, which
is a single command that effectively runs `pyre stop` followed by
Expand Down
2 changes: 2 additions & 0 deletions client/commands/server_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module provides Python event data structures to represent
interactions with the Pyre daemon, as well as an async utility
Expand Down
2 changes: 2 additions & 0 deletions client/commands/server_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module stores all server state related fields as a single class, so all the mutable state
can be accessed in one place. Note that this state is mutable and a singleton, so users of this module
Expand Down
Loading
Loading