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

mypy.ini updates from commontooling #10

Merged
merged 1 commit into from
Aug 3, 2022
Merged
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
File renamed without changes.
4 changes: 2 additions & 2 deletions static-commontooling/docker/Dockerfile_multi_macros.j2
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ CMD ["{{ modname }}", "tests"]
FROM tests AS mypy
WORKDIR /{{ modname }}/

# Copy in .flake8 and setup.cfg
COPY setup.cfg ./
# Copy in .mypy.ini
COPY .mypy.ini ./

# Create mypy cache dir. If this is missing, it can mask some errors
RUN mkdir .mypy_cache
Expand Down
2 changes: 1 addition & 1 deletion static-commontooling/make/docker.mk
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ endif
MS_DOCKER_MYPY?=TRUE
ifeq "${MS_DOCKER_MYPY}" "TRUE"
ifeq "${COMMONTOOLING_BUILD_ENV}" "internal"
ms_docker-build-mypy: $(topdir)/setup.cfg
ms_docker-build-mypy: $(topdir)/.mypy.ini
endif
ifneq "${FORGE_CERT}" ""
ms_docker-run-mypy: EXTRA_DOCKER_RUN_ARGS+=--mount type=bind,source=${FORGE_CERT},target=/run/secrets/forgecert,readonly
Expand Down
8 changes: 2 additions & 6 deletions static-commontooling/make/pythonic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ endif

CLEAN_FILES += $(topbuilddir)/dist

# Identify the source files for pythonic code
PYTHONIC_SOURCES:=$(eval PYTHONIC_SOURCES := $(shell find $(topdir)/$(MODNAME) -type f -name '*.py') $(topdir)/setup.py $(topdir)/MANIFEST.in $(topdir)/setup.cfg)$(value PYTHONIC_SOURCES)
PYTHONIC_TEST_SOURCES:=$(eval PYTHONIC_TEST_SOURCES := $(shell find $(topdir)/tests -type f -name '*.py') $(topdir)/test-requirements.txt)$(value PYTHONIC_TEST_SOURCES)

# Add extra dependencies to the core targets
all: help-pythonic

Expand Down Expand Up @@ -89,8 +85,8 @@ CLEAN_FILES += $(topbuilddir)/constraints.txt
MISC_FILES+=$(topdir)/.flake8

ifeq "${COMMONTOOLING_BUILD_ENV}" "internal"
MISC_FILES+=$(topdir)/setup.cfg
EXTRA_GITIGNORE_LINES+=setup.cfg
MISC_FILES+=$(topdir)/.mypy.ini
EXTRA_GITIGNORE_LINES+=.mypy.ini
endif

include $(commontooling_dir)/make/include/miscfiles.mk
Expand Down