Skip to content

Commit

Permalink
Remove ignores for updated mypy (#4253)
Browse files Browse the repository at this point in the history
Mypy==0.982 has just been released and fixed the inherent type/callable type hinting that was the problem from #4234. As a result, the type ignore comments added in #4234 to bypass the type/callable issue are not unneeded and are breaking CI.

(cherry picked from commit 0ba3e29)

# Conflicts:
#	ddtrace/profiling/collector/memalloc.py
#	ddtrace/profiling/exporter/http.py
  • Loading branch information
Yun-Kim authored and mergify[bot] committed Oct 3, 2022
1 parent daa6839 commit 4961a1a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ddtrace/profiling/collector/memalloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,17 @@ class MemoryCollector(collector.PeriodicCollector):
_interval = attr.ib(default=_DEFAULT_INTERVAL, repr=False)

# TODO make this dynamic based on the 1. interval and 2. the max number of events allowed in the Recorder
<<<<<<< HEAD
_max_events = attr.ib(factory=attr_utils.from_env("_DD_PROFILING_MEMORY_EVENTS_BUFFER", _DEFAULT_MAX_EVENTS, int))
=======
_max_events = attr.ib(
factory=attr_utils.from_env(
"_DD_PROFILING_MEMORY_EVENTS_BUFFER",
_DEFAULT_MAX_EVENTS,
int,
)
)
>>>>>>> 0ba3e299 (Remove ignores for updated mypy (#4253))
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
7 changes: 7 additions & 0 deletions ddtrace/profiling/exporter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ class PprofHTTPExporter(pprof.PprofExporter):
api_key = attr.ib(default=None, type=typing.Optional[str])
# 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.
<<<<<<< HEAD
timeout = attr.ib(factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", 10.0, float), type=float)
=======
timeout = attr.ib(
factory=attr_utils.from_env("DD_PROFILING_API_TIMEOUT", 10.0, float),
type=float,
)
>>>>>>> 0ba3e299 (Remove ignores for updated mypy (#4253))
service = attr.ib(default=None, type=typing.Optional[str])
env = attr.ib(default=None, type=typing.Optional[str])
version = attr.ib(default=None, type=typing.Optional[str])
Expand Down

0 comments on commit 4961a1a

Please sign in to comment.