canonical / canonical/cloud-init

[enhancement]: fix typing of untyped-defs

Open
#5,445 33 comments 2 reactions 0 assignees View on GitHub
enhancement good first issue hacktoberfest
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

# Enhancement

In https://github.com/canonical/cloud-init/pull/5409 we enabled the `check_untyped_defs` mypy lint to not include more type issues and disabled modules not passing the check. Fix them all!

If you want to work any of the modules listed below, please add a comment with the name of the module you are working on so that work isn't duplicated.

## Disabled modules

- [x] cloudinit.analyze
- [x] cloudinit.analyze.dump
- [x] cloudinit.analyze.show
- [x] cloudinit.cmd.devel.hotplug_hook
- [x] cloudinit.cmd.devel.make_mime
- [x] cloudinit.cmd.devel.net_convert
- [x] cloudinit.cmd.main
- [ ] cloudinit.config.cc_apt_configure
- [ ] cloudinit.config.cc_ca_certs
- [x] cloudinit.config.cc_growpart
- [x] cloudinit.config.cc_ntp
- [x] cloudinit.config.cc_power_state_change
- [x] cloudinit.config.cc_rsyslog
- [x] cloudinit.config.cc_ubuntu_pro
- [x] cloudinit.config.modules (priority)
- [x] cloudinit.distros
- [ ] cloudinit.distros.alpine
- [ ] cloudinit.distros.azurelinux
- [ ] cloudinit.distros.bsd
- [ ] cloudinit.distros.opensuse
- [ ] cloudinit.distros.parsers.hostname
- [x] cloudinit.distros.parsers.hosts
- [ ] cloudinit.distros.parsers.resolv_conf
- [x] cloudinit.distros.ubuntu
- [ ] cloudinit.distros.ug_util (priority)
- [ ] cloudinit.helpers (priority)
- [x] cloudinit.net.cmdline (priority)
- [x] cloudinit.net.eni
- [ ] cloudinit.net.ephemeral
- [ ] cloudinit.net.freebsd
- [ ] cloudinit.net.netbsd
- [ ] cloudinit.net.network_manager
- [ ] cloudinit.net.network_state (priority)
- [ ] cloudinit.net.networkd
- [x] cloudinit.net.sysconfig
- [ ] cloudinit.netinfo
- [x] cloudinit.sources.DataSourceAzure
- [ ] cloudinit.sources.DataSourceBigstep
- [x] cloudinit.sources.DataSourceCloudSigma
- [ ] cloudinit.sources.DataSourceCloudStack
- [ ] cloudinit.sources.DataSourceConfigDrive
- [ ] cloudinit.sources.DataSourceDigitalOcean
- [ ] cloudinit.sources.DataSourceEc2
- [ ] cloudinit.sources.DataSourceExoscale
- [ ] cloudinit.sources.DataSourceGCE
- [ ] cloudinit.sources.DataSourceHetzner
- [x] cloudinit.sources.DataSourceMAAS
- [ ] cloudinit.sources.DataSourceNoCloud
- [ ] cloudinit.sources.DataSourceOVF
- [x] cloudinit.sources.DataSourceOpenNebula
- [ ] cloudinit.sources.DataSourceOpenStack
- [x] cloudinit.sources.DataSourceOracle
- [ ] cloudinit.sources.DataSourceRbxCloud
- [ ] cloudinit.sources.DataSourceScaleway
- [ ] cloudinit.sources.DataSourceSmartOS
- [ ] cloudinit.sources.DataSourceVMware
- [x] cloudinit.sources
- [ ] cloudinit.sources.helpers.azure
- [x] cloudinit.sources.helpers.ec2
- [ ] cloudinit.sources.helpers.netlink
- [ ] cloudinit.sources.helpers.openstack
- [ ] cloudinit.sources.helpers.vmware.imc.config_file
- [ ] cloudinit.sources.helpers.vmware.imc.config_nic
- [x] cloudinit.sources.helpers.vultr
- [ ] cloudinit.ssh_util (priority)
- [x] cloudinit.stages
- [x] cloudinit.temp_utils
- [x] cloudinit.templater
- [ ] cloudinit.user_data (priority)
- [x] tests.integration_tests.instances
- [x] tests.unittests.analyze.test_show
- [x] tests.unittests.cmd.devel.test_hotplug_hook
- [x] tests.unittests.cmd.devel.test_render
- [x] tests.unittests.cmd.test_clean
- [x] tests.unittests.cmd.test_query
- [x] tests.unittests.cmd.test_status
- [x] tests.unittests.config.test_apt_configure_sources_list_v1
- [ ] tests.unittests.config.test_apt_configure_sources_list_v3
- [ ] tests.unittests.config.test_apt_source_v1
- [x] tests.unittests.config.test_apt_source_v3
- [x] tests.unittests.config.test_cc_ansible
- [x] tests.unittests.config.test_cc_apk_configure
- [ ] tests.unittests.config.test_cc_apt_pipelining
- [x] tests.unittests.config.test_cc_bootcmd
- [ ] tests.unittests.config.test_cc_ca_certs
- [ ] tests.unittests.config.test_cc_chef
- [x] tests.unittests.config.test_cc_disable_ec2_metadata
- [ ] tests.unittests.config.test_cc_final_message
- [ ] tests.unittests.config.test_cc_growpart
- [x] tests.unittests.config.test_cc_grub_dpkg
- [ ] tests.unittests.config.test_cc_install_hotplug
- [ ] tests.unittests.config.test_cc_keys_to_console
- [x] tests.unittests.config.test_cc_landscape
- [x] tests.unittests.config.test_cc_locale
- [x] tests.unittests.config.test_cc_mcollective
- [x] tests.unittests.config.test_cc_mounts
- [x] tests.unittests.config.test_cc_phone_home
- [x] tests.unittests.config.test_cc_power_state_change
- [ ] tests.unittests.config.test_cc_puppet
- [ ] tests.unittests.config.test_cc_resizefs
- [ ] tests.unittests.config.test_cc_resolv_conf
- [ ] tests.unittests.config.test_cc_rh_subscription
- [x] tests.unittests.config.test_cc_rsyslog
- [x] tests.unittests.config.test_cc_runcmd
- [x] tests.unittests.config.test_cc_snap
- [x] tests.unittests.config.test_cc_ssh
- [x] tests.unittests.config.test_cc_timezone
- [ ] tests.unittests.config.test_cc_ubuntu_autoinstall
- [x] tests.unittests.config.test_cc_ubuntu_drivers
- [x] tests.unittests.config.test_cc_ubuntu_pro
- [ ] tests.unittests.config.test_cc_update_etc_hosts
- [ ] tests.unittests.config.test_cc_users_groups
- [ ] tests.unittests.config.test_cc_wireguard
- [ ] tests.unittests.config.test_cc_yum_add_repo
- [ ] tests.unittests.config.test_cc_zypper_add_repo
- [ ] tests.unittests.config.test_modules
- [ ] tests.unittests.config.test_schema
- [ ] tests.unittests.conftest (priority)
- [x] tests.unittests.distros.test_alpine
- [x] tests.unittests.distros.test_hosts
- [ ] tests.unittests.distros.test_ifconfig
- [ ] tests.unittests.distros.test_netbsd
- [ ] tests.unittests.distros.test_netconfig
- [ ] tests.unittests.distros.test_opensuse
- [ ] tests.unittests.distros.test_user_data_normalize
- [ ] tests.unittests.helpers (priority)
- [ ] tests.unittests.net.test_dhcp
- [ ] tests.unittests.net.test_init
- [x] tests.unittests.net.test_network_state
- [ ] tests.unittests.net.test_networkd
- [ ] tests.unittests.runs.test_merge_run
- [ ] tests.unittests.runs.test_simple_run
- [ ] tests.unittests.sources.azure.test_errors
- [ ] tests.unittests.sources.azure.test_imds
- [ ] tests.unittests.sources.helpers.test_openstack
- [ ] tests.unittests.sources.test_aliyun
- [ ] tests.unittests.sources.test_altcloud
- [ ] tests.unittests.sources.test_azure
- [ ] tests.unittests.sources.test_azure_helper
- [ ] tests.unittests.sources.test_cloudsigma
- [ ] tests.unittests.sources.test_common
- [ ] tests.unittests.sources.test_configdrive
- [ ] tests.unittests.sources.test_digitalocean
- [ ] tests.unittests.sources.test_ec2
- [ ] tests.unittests.sources.test_exoscale
- [ ] tests.unittests.sources.test_gce
- [ ] tests.unittests.sources.test_init
- [x] tests.unittests.sources.test_lxd
- [x] tests.unittests.sources.test_maas
- [ ] tests.unittests.sources.test_nocloud
- [x] tests.unittests.sources.test_opennebula
- [ ] tests.unittests.sources.test_openstack
- [ ] tests.unittests.sources.test_oracle
- [x] tests.unittests.sources.test_ovf
- [ ] tests.unittests.sources.test_rbx
- [ ] tests.unittests.sources.test_scaleway
- [ ] tests.unittests.sources.test_smartos
- [ ] tests.unittests.sources.test_upcloud
- [ ] tests.unittests.sources.test_vultr
- [x] tests.unittests.sources.test_wsl
- [ ] tests.unittests.sources.vmware.test_vmware_config_file
- [ ] tests.unittests.test__init__
- [ ] tests.unittests.test_apport
- [ ] tests.unittests.test_builtin_handlers
- [x] tests.unittests.test_cli
- [ ] tests.unittests.test_conftest
- [x] tests.unittests.test_data
- [ ] tests.unittests.test_ds_identify
- [ ] tests.unittests.test_helpers
- [x] tests.unittests.test_log
- [ ] tests.unittests.test_merging
- [ ] tests.unittests.test_net
- [ ] tests.unittests.test_net_activators
- [ ] tests.unittests.test_ssh_util
- [ ] tests.unittests.test_stages
- [ ] tests.unittests.test_subp
- [ ] tests.unittests.test_templating
- [ ] tests.unittests.test_upgrade
- [ ] tests.unittests.test_url_helper
- [ ] tests.unittests.test_util
- [x] tests.unittests.util (priority)
- [ ] netplan_schema_check
- [x] mock-meta

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.