Skip to content

Commit

Permalink
chore(profiling): remove unused ignore with latest mypy 0.982
Browse files Browse the repository at this point in the history
  • Loading branch information
jd committed Oct 3, 2022
1 parent 82b1521 commit 88d6861
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ddtrace/profiling/collector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ def _create_capture_sampler(collector):

@attr.s
class CaptureSamplerCollector(Collector):
capture_pct = attr.ib(factory=attr_utils.from_env("DD_PROFILING_CAPTURE_PCT", 1.0, float)) # type: ignore[arg-type]
capture_pct = attr.ib(factory=attr_utils.from_env("DD_PROFILING_CAPTURE_PCT", 1.0, float))
_capture_sampler = attr.ib(default=attr.Factory(_create_capture_sampler, takes_self=True), init=False, repr=False)
2 changes: 1 addition & 1 deletion ddtrace/profiling/collector/_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def __get__(self, instance, owner=None):
class LockCollector(collector.CaptureSamplerCollector):
"""Record lock usage."""

nframes = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int)) # type: ignore[arg-type]
nframes = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int))
endpoint_collection_enabled = attr.ib(
factory=attr_utils.from_env("DD_PROFILING_ENDPOINT_COLLECTION_ENABLED", True, formats.asbool)
)
Expand Down
4 changes: 2 additions & 2 deletions ddtrace/profiling/collector/memalloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ class MemoryCollector(collector.PeriodicCollector):
factory=attr_utils.from_env(
"_DD_PROFILING_MEMORY_EVENTS_BUFFER",
_DEFAULT_MAX_EVENTS,
int, # type: ignore[arg-type]
int,
)
)
max_nframe = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int)) # type: ignore[arg-type]
max_nframe = attr.ib(factory=attr_utils.from_env("DD_PROFILING_MAX_FRAMES", 64, int))
heap_sample_size = attr.ib(type=int, factory=_get_default_heap_sample_size)
ignore_profiler = attr.ib(factory=attr_utils.from_env("DD_PROFILING_IGNORE_PROFILER", False, formats.asbool))

Expand Down
2 changes: 1 addition & 1 deletion ddtrace/profiling/exporter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class PprofHTTPExporter(pprof.PprofExporter):
# Do not use the default agent timeout: it is too short, the agent is just a unbuffered proxy and the profiling
# backend is not as fast as the tracer one.
timeout = attr.ib(
factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", 10.0, float), # type: ignore[arg-type]
factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", 10.0, float),
type=float,
)
service = attr.ib(default=None, type=typing.Optional[str])
Expand Down
2 changes: 1 addition & 1 deletion ddtrace/profiling/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Scheduler(periodic.PeriodicService):
exporters = attr.ib()
before_flush = attr.ib(default=None, eq=False)
_interval = attr.ib(
factory=attr_utils.from_env("DD_PROFILING_UPLOAD_INTERVAL", 60.0, float) # type: ignore[arg-type]
factory=attr_utils.from_env("DD_PROFILING_UPLOAD_INTERVAL", 60.0, float)
)
_configured_interval = attr.ib(init=False)
_last_export = attr.ib(init=False, default=None, eq=False)
Expand Down

0 comments on commit 88d6861

Please sign in to comment.