When running in command prompt (gpt disk with no partitions) mkpart PartName ext4 1M 500M partition is created and "print" command shows file system ext4   When running parted /dev/sda mkpart PartName ext4 1M 500M parted creates partition but "print" does show file system.   So "mkpart" works different in interactive mode and non-interactive (file system is ignored)